add completion
This commit is contained in:
parent
03818ff10e
commit
6e78419971
4 changed files with 26 additions and 1 deletions
16
gis_completion.bash
Normal file
16
gis_completion.bash
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
function _gis_completion {
|
||||
cur=${COMP_WORDS[COMP_CWORD]}
|
||||
prev=${COMP_WORDS[COMP_CWORD-1]}
|
||||
if [[ ${prev} == -p ]] || [[ ${prev} == --path ]]; then
|
||||
OLDIFS=$IFS
|
||||
IFS='
|
||||
'
|
||||
COMPREPLY=( $(compgen -d -- "${cur}") )
|
||||
IFS=$OLDIFS
|
||||
else
|
||||
args="--help --path fetch pull"
|
||||
COMPREPLY=( $(compgen -W "${args}" -- "${cur}") )
|
||||
fi
|
||||
}
|
||||
|
||||
complete -o filenames -F _gis_completion gis
|
||||
Loading…
Add table
Add a link
Reference in a new issue