Implement basic bash autocompletion in the scripts/bash-autocompletion.sh file.
This commit is contained in:
parent
7ccb83dfce
commit
3ea7d384e0
|
@ -1 +1,15 @@
|
|||
# Bash autocomplete script for yerbacon
|
||||
|
||||
_ybconAutoComplete() {
|
||||
local current previous options
|
||||
COMPREPLY=()
|
||||
current="${COMP_WORDS[COMP_CWORD]}"
|
||||
previous="${COMP_WORDS[COMP_CWORD-1]}"
|
||||
options="-p --help --printresult"
|
||||
if [[ ${current} == -* ]]; then
|
||||
COMPREPLY=( "$(compgen -W "$options" -- "$current")" )
|
||||
return 0
|
||||
fi
|
||||
}
|
||||
|
||||
complete -F _ybconAutoComplete ybcon
|
Loading…
Reference in New Issue