revert apm.completion.bash (requested by @nwinkler https://github.com/Bash-it/bash-it/pull/1782#discussion_r555183474)
parent
a117c28d8c
commit
d7fdb8e827
|
|
@ -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]}"
|
||||||
|
|
@ -53,8 +51,7 @@ then
|
||||||
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]}
|
||||||
|
|
@ -77,6 +74,4 @@ then
|
||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
|
||||||
complete -F __apm -o bashdefault -o default apm
|
complete -F __apm -o bashdefault -o default apm
|
||||||
fi
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue