Fix #5146 (/etc/bash_completion.d/calibre has errors)

This commit is contained in:
Kovid Goyal 2010-03-30 21:45:47 +05:30
parent 01d00dc78a
commit aeed4c5dca

View File

@ -465,7 +465,8 @@ def opts_and_exts(name, op, exts):
opts = ' '.join(options(op)) opts = ' '.join(options(op))
exts.extend([i.upper() for i in exts]) exts.extend([i.upper() for i in exts])
exts='|'.join(exts) exts='|'.join(exts)
return '_'+name+'()'+\ fname = name.replace('-', '_')
return '_'+fname+'()'+\
''' '''
{ {
local cur prev opts local cur prev opts
@ -498,7 +499,7 @@ def opts_and_exts(name, op, exts):
esac esac
} }
complete -o filenames -F _'''%(opts,exts) + name + ' ' + name +"\n\n" complete -o filenames -F _'''%(opts,exts) + fname + ' ' + name +"\n\n"
VIEWER = '''\ VIEWER = '''\