Add shell completions for decman

This commit is contained in:
Kivi Kaitaniemi
2025-12-18 05:59:41 +02:00
parent 1e3b83b3d8
commit 45e8879962
3 changed files with 55 additions and 0 deletions
+14
View File
@@ -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]'
+30
View File
@@ -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
+11
View File
@@ -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"