diff options
Diffstat (limited to 'completions/dpkg-source')
-rw-r--r-- | completions/dpkg-source | 23 |
1 files changed, 7 insertions, 16 deletions
diff --git a/completions/dpkg-source b/completions/dpkg-source index 6cd9bde3..54403851 100644 --- a/completions/dpkg-source +++ b/completions/dpkg-source @@ -8,7 +8,7 @@ _dpkg_source() local options work i action packopts unpackopts fields packopts="-c -l -F -V -T -D -U -W -E -sa -i -I -sk -sr -ss -sA -sK -sP \ - -sU -sR" + -sU -sR" unpackopts="-sp -sn -su" options="-x -b $packopts $unpackopts" fields="Format Source Version Binary Maintainer Uploader Architecture \ @@ -31,22 +31,19 @@ _dpkg_source() -x) _filedir -d _filedir 'dsc' - return 0 ;; *) COMPREPLY=( $( compgen -W "$unpackopts" -- "$cur" ) ) _filedir -d _filedir - return 0 ;; esac - return 0 + return ;; pack) case $prev in -b) _filedir -d - return 0 ;; -c|-l|-T|-i|-I) # -c: get controlfile @@ -57,19 +54,16 @@ _dpkg_source() # return directory names and file names _filedir -d _filedir - return 0 ;; -F) # -F: force change log format COMPREPLY=( $( command ls /usr/lib/dpkg/parsechangelog ) ) - return 0 ;; -V|-D) # -V: set a substitution variable # we don't know anything about possible variables or values # so we don't try to suggest any completion. COMPREPLY=() - return 0 ;; -D) # -D: override or add a .dsc field and value @@ -77,31 +71,28 @@ _dpkg_source() if [[ "$cur" == *=* ]]; then # $cur contains a "=" COMPREPLY=() - return 0 else COMPREPLY=( $( compgen -W "$fields" -- "$cur" ) ) - return 0 fi ;; -U) # -U: remove a field # Suggest possible fieldnames COMPREPLY=( $( compgen -W "$fields" -- "$cur" ) ) - return 0 ;; *) - COMPREPLY=( $( compgen -W "$packopts $unpackopts" -- "$cur" ) ) - return 0 + COMPREPLY=( $( compgen -W "$packopts $unpackopts" \ + -- "$cur" ) ) ;; esac - return 0 + return ;; *) COMPREPLY=( $( compgen -W "$options" -- "$cur" ) ) - return 0 + return ;; esac } && complete -F _dpkg_source dpkg-source -# ex: ts=4 sw=4 et filetype=sh +# ex: filetype=sh |