mirror of
https://github.com/fish-shell/fish-shell
synced 2024-12-26 04:43:10 +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)
|
set -l ctoken (commandline -ct)
|
||||||
switch $ctoken
|
switch $ctoken
|
||||||
case '*=*'
|
case '*=*'
|
||||||
# Some seds (e.g. on Mac OS X), don't support \n in the RHS
|
set ctoken (string split "=" -- $ctoken)
|
||||||
# Use a literal newline instead
|
|
||||||
# http://sed.sourceforge.net/sedfaq4.html#s4.1
|
|
||||||
set ctoken (echo $ctoken | sed 's/=/\\
|
|
||||||
/')
|
|
||||||
printf '%s\n' $ctoken[1]=(complete -C$ctoken[2])
|
printf '%s\n' $ctoken[1]=(complete -C$ctoken[2])
|
||||||
case '*'
|
case '*'
|
||||||
complete -C$ctoken
|
complete -C$ctoken
|
||||||
|
|
Loading…
Reference in a new issue