completions: pass the correct args to git and ninja

This commit is contained in:
Johannes Altmanninger 2020-04-02 09:43:22 +02:00
parent 61a9cdaa74
commit 4884a4080e
2 changed files with 6 additions and 6 deletions

View File

@ -16,7 +16,8 @@ function __fish_git
end
end
# Using 'command git' to avoid interactions for aliases from git to (e.g.) hub
command git $global_args $saved_args
# Using eval to expand ~ and variables specified on the commandline.
eval command git $global_args \$saved_args
end
# Print an optspec for argparse to handle git's options that are independent of any subcommand.

View File

@ -1,11 +1,10 @@
function __fish_ninja
set -l saved_args $argv
set -l dir .
argparse -i C/dir= -- (commandline -opc)
and set -ql _flag_C
and set -l dir $_flag_C
test -f $dir/build.ninja
and command ninja -C$dir $saved_args
if argparse -i C/dir= -- (commandline -opc) && set -ql _flag_C
# Using eval to expand ~ and variables specified on the commandline.
eval command ninja -C$_flag_C \$saved_args
end
end
function __fish_print_ninja_tools