mirror of
git://github.com/kovidgoyal/calibre.git
synced 2025-12-23 08:15:53 +01:00
IGN:...
This commit is contained in:
parent
6b474cbc44
commit
ecdb460426
1 changed files with 3 additions and 2 deletions
|
|
@ -12,7 +12,7 @@
|
|||
completion.
|
||||
'''
|
||||
|
||||
import sys, os, shlex, glob
|
||||
import sys, os, shlex, glob, re
|
||||
from functools import partial
|
||||
|
||||
from calibre import prints
|
||||
|
|
@ -53,8 +53,9 @@ def do_opt(opt):
|
|||
for x in do_opt(o): yield x
|
||||
|
||||
def send(ans):
|
||||
pat = re.compile('([^0-9a-zA-Z_.])')
|
||||
for x in sorted(set(ans)):
|
||||
x = x.replace(' ', '\\ ')
|
||||
x = pat.sub(lambda m : '\\'+m.group(1), x)
|
||||
if x.endswith('\\ '):
|
||||
x = x[:-2]+' '
|
||||
prints(x)
|
||||
|
|
|
|||
Loading…
Reference in a new issue