diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-04 01:03:18 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-04 01:03:18 +0000 |
commit | f2621414ee5f2f601424c22f00e207903e3b6104 (patch) | |
tree | 56a856dafd1ca684bb23263cacaa723ee4f404fc /completions/pkgrm | |
parent | Adding debian version 1:2.11-8. (diff) | |
download | bash-completion-f2621414ee5f2f601424c22f00e207903e3b6104.tar.xz bash-completion-f2621414ee5f2f601424c22f00e207903e3b6104.zip |
Merging upstream version 1:2.12.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'completions/pkgrm')
-rw-r--r-- | completions/pkgrm | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/completions/pkgrm b/completions/pkgrm index 2449d34..bb5327e 100644 --- a/completions/pkgrm +++ b/completions/pkgrm @@ -1,11 +1,11 @@ -# pkgrm completion -*- shell-script -*- +# pkgrm completion -*- shell-script -*- # # Copyright 2006 Yann Rouillard <yann@opencsw.org> -_pkgrm() +_comp_cmd_pkgrm() { - local cur prev words cword - _init_completion || return + local cur prev words cword comp_args + _comp_initialize -- "$@" || return # if a spool directory was given # we must complete with the package @@ -24,23 +24,23 @@ _pkgrm() case $prev in -a | -V) - _filedir + _comp_compgen_filedir ;; -s | -R) - _filedir -d + _comp_compgen_filedir -d ;; -Y) ;; *) if [[ ${cur} == -* ]]; then local opts="-a -A -n -M -R -s -v -V -Y" - COMPREPLY=($(compgen -W "${opts}" -- ${cur})) + _comp_compgen -- -W "${opts}" else - COMPREPLY=($(compgen -W "$(/bin/ls -1 $spool)" -- ${cur})) + _comp_compgen_split -- "$(/bin/ls -1 "$spool")" fi ;; esac } && - complete -F _pkgrm pkgrm + complete -F _comp_cmd_pkgrm pkgrm # ex: filetype=sh |