mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
zsh completion: Case independent extension matching
This commit is contained in:
parent
eef88f8f3f
commit
20553e8234
@ -239,9 +239,8 @@ class ZshCompleter(object): # {{{
|
||||
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…
x
Reference in New Issue
Block a user