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 | f4acb49ea148cdd899f7f29f1591c7bc853c2135 (patch) | |
tree | b62d60873864065d6428a84a119dd8a3c90f1397 /completions/dpkg-source | |
parent | Adding upstream version 1:2.11. (diff) | |
download | bash-completion-f4acb49ea148cdd899f7f29f1591c7bc853c2135.tar.xz bash-completion-f4acb49ea148cdd899f7f29f1591c7bc853c2135.zip |
Adding upstream version 1:2.12.0.upstream/1%2.12.0
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'completions/dpkg-source')
-rw-r--r-- | completions/dpkg-source | 32 |
1 files changed, 14 insertions, 18 deletions
diff --git a/completions/dpkg-source b/completions/dpkg-source index 05fa3a1..c9131b2 100644 --- a/completions/dpkg-source +++ b/completions/dpkg-source @@ -1,9 +1,9 @@ # Debian dpkg-source completion -*- shell-script -*- -_dpkg_source() +_comp_cmd_dpkg_source() { - local cur prev words cword - _init_completion || return + local cur prev words cword comp_args + _comp_initialize -- "$@" || return local options word action packopts unpackopts fields @@ -29,13 +29,11 @@ _dpkg_source() unpack) case $prev in -x) - _filedir -d - _filedir 'dsc' + _comp_compgen_filedir 'dsc' ;; *) - COMPREPLY=($(compgen -W "$unpackopts" -- "$cur")) - _filedir -d - _filedir + _comp_compgen -- -W "$unpackopts" + _comp_compgen -a filedir ;; esac return @@ -43,7 +41,7 @@ _dpkg_source() pack) case $prev in -b) - _filedir -d + _comp_compgen_filedir -d ;; -c | -l | -T | -i | -I) # -c: get controlfile @@ -52,12 +50,11 @@ _dpkg_source() # -i: <regexp> filter out files to ignore diffs of. # -I: filter out files when building tarballs. # return directory names and file names - _filedir -d - _filedir + _comp_compgen_filedir ;; -F) # -F: force change log format - COMPREPLY=($(command ls /usr/lib/dpkg/parsechangelog)) + _comp_compgen_split -- "$(command ls /usr/lib/dpkg/parsechangelog)" ;; -V) # -V: set a substitution variable @@ -72,27 +69,26 @@ _dpkg_source() # $cur contains a "=" COMPREPLY=() else - COMPREPLY=($(compgen -W "$fields" -- "$cur")) + _comp_compgen -- -W "$fields" fi ;; -U) # -U: remove a field # Suggest possible fieldnames - COMPREPLY=($(compgen -W "$fields" -- "$cur")) + _comp_compgen -- -W "$fields" ;; *) - COMPREPLY=($(compgen -W "$packopts $unpackopts" \ - -- "$cur")) + _comp_compgen -- -W '$packopts $unpackopts' ;; esac return ;; *) - COMPREPLY=($(compgen -W "$options" -- "$cur")) + _comp_compgen -- -W "$options" return ;; esac } && - complete -F _dpkg_source dpkg-source + complete -F _comp_cmd_dpkg_source dpkg-source # ex: filetype=sh |