diff --git a/completions/_decman b/completions/_decman new file mode 100644 index 0000000..ba201cd --- /dev/null +++ b/completions/_decman @@ -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]' diff --git a/completions/decman.bash b/completions/decman.bash new file mode 100644 index 0000000..5d2a1b3 --- /dev/null +++ b/completions/decman.bash @@ -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 diff --git a/completions/decman.fish b/completions/decman.fish new file mode 100644 index 0000000..855c3a2 --- /dev/null +++ b/completions/decman.fish @@ -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"