mirror of
https://github.com/fish-shell/fish-shell
synced 2024-12-26 12:53:13 +00:00
parent
1c3c76165e
commit
2de3f7c686
3 changed files with 12 additions and 11 deletions
|
@ -1,3 +1,15 @@
|
|||
function __fish_print_ninja_tools
|
||||
echo list
|
||||
if test -f build.ninja
|
||||
ninja -t list | string match -v '*:' | string replace -r '\s+(\w+).*' '$1'
|
||||
end
|
||||
end
|
||||
|
||||
function __fish_print_ninja_targets
|
||||
if test -f build.ninja
|
||||
ninja -t targets 2>/dev/null | string replace -r ':.*' ''
|
||||
end
|
||||
end
|
||||
complete -c ninja -f -a '(__fish_print_ninja_targets)' -d target
|
||||
complete -x -c ninja -s t -x -a "(__fish_print_ninja_tools)" -d subtool
|
||||
complete -x -c ninja -s C -x -a "(__fish_complete_directories (commandline -ct))" -d "change to specified directory"
|
||||
|
|
|
@ -1,5 +0,0 @@
|
|||
function __fish_print_ninja_targets
|
||||
if [ -f build.ninja ]
|
||||
ninja -t targets 2>/dev/null | string replace -r ':.*' ''
|
||||
end
|
||||
end
|
|
@ -1,6 +0,0 @@
|
|||
function __fish_print_ninja_tools
|
||||
echo list
|
||||
if [ -f build.ninja ]
|
||||
ninja -t list | string match -v '*:' | string replace -r '\s+(\w+).*' '$1'
|
||||
end
|
||||
end
|
Loading…
Reference in a new issue