mirror of
https://github.com/kiviktnm/decman.git
synced 2026-09-19 12:08:28 +00:00
Add shell completions for decman
This commit is contained in:
@@ -0,0 +1,14 @@
|
|||||||
|
#compdef decman
|
||||||
|
# zsh completion for decman
|
||||||
|
|
||||||
|
_arguments -s \
|
||||||
|
'--source=[python file containing configuration]:config file:_files' \
|
||||||
|
'--dry-run[print what would happen as a result of running decman]' \
|
||||||
|
'--print[print what would happen as a result of running decman]' \
|
||||||
|
'--debug[show debug output]' \
|
||||||
|
'--skip=[skip the following execution steps]:step(s):*' \
|
||||||
|
'--only=[run only the following execution steps]:step(s):*' \
|
||||||
|
'--no-hooks[don'\''t run hook methods for modules]' \
|
||||||
|
'--no-color[don'\''t print messages with color]' \
|
||||||
|
'--params=[additional parameters passed to plugins]:param(s):*' \
|
||||||
|
'--help[show help]'
|
||||||
@@ -0,0 +1,30 @@
|
|||||||
|
# bash completion for decman
|
||||||
|
|
||||||
|
_decman() {
|
||||||
|
local cur prev opts
|
||||||
|
COMPREPLY=()
|
||||||
|
cur="${COMP_WORDS[COMP_CWORD]}"
|
||||||
|
prev="${COMP_WORDS[COMP_CWORD-1]}"
|
||||||
|
|
||||||
|
opts="--source --dry-run --print --debug --skip --only --no-hooks --no-color --params --help"
|
||||||
|
|
||||||
|
case "$prev" in
|
||||||
|
--source)
|
||||||
|
# file completion
|
||||||
|
COMPREPLY=( $(compgen -f -- "$cur") )
|
||||||
|
return 0
|
||||||
|
;;
|
||||||
|
--skip|--only|--params)
|
||||||
|
# free-form list
|
||||||
|
return 0
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
if [[ "$cur" == --* ]]; then
|
||||||
|
COMPREPLY=( $(compgen -W "$opts" -- "$cur") )
|
||||||
|
return 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
complete -F _decman decman
|
||||||
@@ -0,0 +1,11 @@
|
|||||||
|
# fish completion for decman
|
||||||
|
|
||||||
|
complete -c decman -l source -r -d "python file containing configuration" -a "(__fish_complete_path)"
|
||||||
|
complete -c decman -l dry-run -d "print what would happen as a result of running decman"
|
||||||
|
complete -c decman -l print -d "print what would happen as a result of running decman"
|
||||||
|
complete -c decman -l debug -d "show debug output"
|
||||||
|
complete -c decman -l skip -r -d "skip the following execution steps"
|
||||||
|
complete -c decman -l only -r -d "run only the following execution steps"
|
||||||
|
complete -c decman -l no-hooks -d "don't run hook methods for modules"
|
||||||
|
complete -c decman -l no-color -d "don't print messages with color"
|
||||||
|
complete -c decman -l params -r -d "additional parameters passed to plugins"
|
||||||
Reference in New Issue
Block a user