pull/1782/head
Gurkirat Singh 2021-01-16 05:30:20 +05:30
parent a117c28d8c
commit d7fdb8e827
No known key found for this signature in database
GPG Key ID: CFD64E1DCB3DA835
1 changed files with 50 additions and 55 deletions

View File

@ -24,9 +24,7 @@
# repo: https://github.com/vigo/apm-bash-completion # repo: https://github.com/vigo/apm-bash-completion
if _command_exists apm __apm(){
then
function __apm(){
local cur prev options apm_command local cur prev options apm_command
COMPREPLY=() COMPREPLY=()
cur="${COMP_WORDS[COMP_CWORD]}" cur="${COMP_WORDS[COMP_CWORD]}"
@ -52,9 +50,8 @@ then
fi fi
fi fi
COMPREPLY=($(compgen -W "$options" -- "$cur")) COMPREPLY=($(compgen -W "$options" -- "$cur"))
} }
__apm_get_command() {
function __apm_get_command() {
local i local i
for ((i=1; i < $COMP_CWORD; ++i)); do for ((i=1; i < $COMP_CWORD; ++i)); do
local arg=${COMP_WORDS[$i]} local arg=${COMP_WORDS[$i]}
@ -76,7 +73,5 @@ then
return;; return;;
esac esac
done done
} }
complete -F __apm -o bashdefault -o default apm
complete -F __apm -o bashdefault -o default apm
fi