diff --git a/share/completions/npm.fish b/share/completions/npm.fish index 601f9c5b2..e9ec20990 100644 --- a/share/completions/npm.fish +++ b/share/completions/npm.fish @@ -50,7 +50,7 @@ function __fish_complete_npm -d "Complete the commandline using npm's 'completio if command -sq npm # npm completion is bash-centric, so we need to translate fish's "commandline" stuff to bash's $COMP_* stuff # COMP_LINE is an array with the words in the commandline - set -lx COMP_LINE (commandline -o) + set -lx COMP_LINE (commandline -opc) # COMP_CWORD is the index of the current word in COMP_LINE # bash starts arrays with 0, so subtract 1 set -lx COMP_CWORD (math (count $COMP_LINE) - 1) diff --git a/share/completions/phpunit.fish b/share/completions/phpunit.fish index 8cb18caaf..56c51c86d 100644 --- a/share/completions/phpunit.fish +++ b/share/completions/phpunit.fish @@ -11,7 +11,7 @@ end # Lists PHPUnit objects corresponding to the given option function __fish_phpunit_list --argument option # Use the same PHPUnit binary as in the command being completed - set -l phpunit (commandline -o)[1] + set -l phpunit (commandline -opc)[1] test -x $phpunit or return