fork/fish-shell
git clone https://git.julia.blue/fork/fish-shell
4a12d5771
master
1function __fish_ninja 2set -l saved_args$argv 3set -l dir . 4if argparse -u C/dir= --( commandline -xpc) 5command ninja -C$_flag_C $saved_args 6end 7end 8 9function __fish_print_ninja_tools 10__fish_ninja -t list| string match -v'*:' | string replace -r'\s+(\w+).*' '$1' 11end 12 13function __fish_print_ninja_targets 14__fish_ninja -t targets2> /dev/null| string replace -r':.*' '' 15__fish_ninja -t targets all2> /dev/null| string replace -r':.*' '' | string match -e -r'\.(?:o|so|a)$' 16end 17complete -c ninja -f -a'(__fish_print_ninja_targets)' -d target 18complete -x -c ninja -s t -x -a"(__fish_print_ninja_tools)" -d subtool 19complete -x -c ninja -s C -x -a"(__fish_complete_directories (commandline -ct))" -d"change to specified directory" 20complete -c ninja -s f -k -x -a"(__fish_complete_suffix .ninja)" -d"specify build file [default=build.ninja]" 21complete -f -c ninja -s n -d"dry run" 22complete -f -c ninja -s v -d"show all command lines while building" 23complete -f -c ninja -s j -d"number of jobs to run in parallel [default derived from CPUs]" 24complete -f -c ninja -s l -d"do not start if load average > N" 25complete -f -c ninja -s k -d"keep going until N jobs fail [default=1]" 26complete -f -c ninja -s h -d"show help" 27complete -f -c ninja -s d -d"enable debugging, specify debug mode" 28complete -f -c ninja -s w -d"adjust warnings, specify flags" 29complete -f -c ninja -s v -l verbose -d"show all command lines while building" 30complete -f -c ninja -l version -d"print ninja version"