mirror of
git://github.com/kovidgoyal/calibre.git
synced 2025-12-31 23:55:40 +01:00
zsh completion: Case independent extension matching
This commit is contained in:
parent
eef88f8f3f
commit
20553e8234
1 changed files with 2 additions and 3 deletions
|
|
@ -239,9 +239,8 @@ def opts_and_exts(self, name, op, exts, cover_opts=('--cover',),
|
|||
opf_opts=('--opf',), file_map={}):
|
||||
if not self.dest:
|
||||
return
|
||||
exts = set(exts).union(x.upper() for x in exts)
|
||||
pats = ('*.%s'%x for x in exts)
|
||||
extra = ("'*:filename:_files -g \"%s\"' "%' '.join(pats),)
|
||||
exts = sorted(set(exts))
|
||||
extra = (''''*:filename:_files -g '(#i)*.(%s)' ''' % '|'.join(exts),)
|
||||
opts = '\\\n '.join(tuple(self.get_options(
|
||||
op(), cover_opts=cover_opts, opf_opts=opf_opts, file_map=file_map)) + extra)
|
||||
txt = '_arguments -s \\\n ' + opts
|
||||
|
|
|
|||
Loading…
Reference in a new issue