mirror of
https://github.com/fish-shell/fish-shell.git
synced 2025-03-11 12:55:27 +08:00
completions: pass the correct args to git and ninja
This commit is contained in:
parent
61a9cdaa74
commit
4884a4080e
@ -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.
|
||||
|
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user