diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-04 01:03:19 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-04 01:03:19 +0000 |
commit | 6c09f2a45c5541e9c207d14fc7aa21a4a0066bde (patch) | |
tree | 0221189d367bf661f6f9493c4f17a03f0dd4b7d2 /completions/gm | |
parent | Releasing progress-linux version 1:2.11-8~progress7.99u1. (diff) | |
download | bash-completion-6c09f2a45c5541e9c207d14fc7aa21a4a0066bde.tar.xz bash-completion-6c09f2a45c5541e9c207d14fc7aa21a4a0066bde.zip |
Merging upstream version 1:2.12.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'completions/gm')
-rw-r--r-- | completions/gm | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/completions/gm b/completions/gm index b86c9cc..7dbaceb 100644 --- a/completions/gm +++ b/completions/gm @@ -1,21 +1,21 @@ # bash completion for gm(1) -*- shell-script -*- -_gm_commands() +_comp_cmd_gm__commands() { - COMPREPLY+=($(compgen -W '$("$1" help | - awk "/^ +[^ ]+ +- / { print \$1 }")' -- "$cur")) + _comp_compgen -a split -- "$("$1" help | + _comp_awk '/^ +[^ ]+ +- / { print $1 }')" } -_gm() +_comp_cmd_gm() { - local cur prev words cword - _init_completion || return + local cur prev words cword comp_args + _comp_initialize -- "$@" || return if ((cword == 1)); then - _gm_commands "$1" + _comp_cmd_gm__commands "$1" return elif [[ $cword -eq 2 && ${words[1]} == time ]]; then - _gm_commands "$1" + _comp_cmd_gm__commands "$1" return fi @@ -24,7 +24,7 @@ _gm() case $gmcmd in help) - [[ $prev == help ]] && _gm_commands "$1" + [[ $prev == help ]] && _comp_cmd_gm__commands "$1" return ;; version) @@ -32,9 +32,9 @@ _gm() ;; esac - # TODO... defer some commnds to the imagemagick "gm"less completions etc? + # TODO... defer some commands to the imagemagick "gm"less completions etc? compopt -o default } && - complete -F _gm gm + complete -F _comp_cmd_gm gm # ex: filetype=sh |