mirror of
https://github.com/fish-shell/fish-shell.git
synced 2025-01-20 02:32:46 +08:00
Enclose descriptions inside double quotes, and escape any enclosed double quotes.
This commit is contained in:
parent
7ded90ae6a
commit
dca9b83ec0
|
@ -46,7 +46,7 @@ def printcompletecommand(cmdname, args, description):
|
|||
print "complete -c", cmdname,
|
||||
for arg in args:
|
||||
print arg,
|
||||
print "--descripton '" + description + "'"
|
||||
print '--descripton "' + description + '"'
|
||||
print "\n",
|
||||
|
||||
def builtcommand(options, description):
|
||||
|
@ -60,7 +60,7 @@ def builtcommand(options, description):
|
|||
optionlist[i] = "-l " + optionlist[i][2:]
|
||||
else:
|
||||
optionlist[i] = "-s " + optionlist[i][1:]
|
||||
|
||||
description = description.replace('"','\\"')
|
||||
first_period = description.find(".")
|
||||
# print "First period at: ", first_period
|
||||
if first_period >= 45 or first_period == -1 and len(description) > 45:
|
||||
|
|
Loading…
Reference in New Issue
Block a user