mirror of
https://github.com/fish-shell/fish-shell
synced 2024-12-25 12:23:09 +00:00
Another stringification (__fish_complete_command)
This commit is contained in:
parent
cadb5d51ea
commit
b908d0b89b
1 changed files with 1 additions and 5 deletions
|
@ -2,11 +2,7 @@ function __fish_complete_command --description 'Complete using all available com
|
|||
set -l ctoken (commandline -ct)
|
||||
switch $ctoken
|
||||
case '*=*'
|
||||
# Some seds (e.g. on Mac OS X), don't support \n in the RHS
|
||||
# Use a literal newline instead
|
||||
# http://sed.sourceforge.net/sedfaq4.html#s4.1
|
||||
set ctoken (echo $ctoken | sed 's/=/\\
|
||||
/')
|
||||
set ctoken (string split "=" -- $ctoken)
|
||||
printf '%s\n' $ctoken[1]=(complete -C$ctoken[2])
|
||||
case '*'
|
||||
complete -C$ctoken
|
||||
|
|
Loading…
Reference in a new issue