fa/completions/bash/fac
Ari Archer 83e98b6a93
Add a flag to disable type checking
Signed-off-by: Ari Archer <ari.web.xyz@gmail.com>
2022-07-25 08:10:37 +03:00

26 lines
880 B
Bash

# fac completion -*- shell-script -*-
_fac() {
local words cword cmd cur
_init_completion -s || return
for ((cmd = 1; cmd <= cword; cmd++)); do
local flag="${words[cmd]}"
if [[ $flag == -* ]]; then
if [ "$flag" = '-format' ]; then
COMPREPLY=($(compgen -W "x86-64-gnulinux x86-64-freebsd" -- "$cur"))
else
case "$flag" in
-input | -output | -rstack-size | -flags) ;;
*) COMPREPLY=($(compgen -W "-no-anotate -asm-flags -help \
-no-compile -stdout -no-logging -dbg -run -list-formats -format -input
-rstack-size -flags -no-ansi -no-dce -no-stats -no-tc" -- "$cur")) ;;
esac
fi
fi
done
} && complete -F _fac -o bashdefault -o default fac
# ex: filetype=sh