diff options
author | David Paleino <dapal@debian.org> | 2014-03-19 11:10:41 +0100 |
---|---|---|
committer | David Paleino <dapal@debian.org> | 2014-03-19 11:10:41 +0100 |
commit | c962c274f76a553e98b203d0407b714934f06369 (patch) | |
tree | eb1310a252c5e3b05aec666c66a419020269a8f6 /debian/patches | |
parent | 70c2d1b623d74ef06942a1e9390b36384fdc63e0 (diff) | |
download | bash-completion-c962c274f76a553e98b203d0407b714934f06369.tar.gz |
dpkg_support_raw-extract_vextract.patch: add support for more options in dpkg-deb, thanks to Uwe Storbeck (Closes: #698977)
Diffstat (limited to 'debian/patches')
-rw-r--r-- | debian/patches/07-dpkg_support_raw-extract_vextract.patch | 77 | ||||
-rw-r--r-- | debian/patches/series | 1 |
2 files changed, 78 insertions, 0 deletions
diff --git a/debian/patches/07-dpkg_support_raw-extract_vextract.patch b/debian/patches/07-dpkg_support_raw-extract_vextract.patch new file mode 100644 index 00000000..3adad0af --- /dev/null +++ b/debian/patches/07-dpkg_support_raw-extract_vextract.patch @@ -0,0 +1,77 @@ +From: Uwe Storbeck <uwe@ibr.ch> +Subject: support more options for dpkg-deb +Origin: vendor, https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=698977 +Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=698977 +Forwarded: no + +--- + completions/dpkg | 44 +++++++++++++++++++++++++++++++++++++++++--- + 1 file changed, 41 insertions(+), 3 deletions(-) + +--- bash-completion.orig/completions/dpkg ++++ bash-completion/completions/dpkg +@@ -32,7 +32,7 @@ _comp_dpkg_purgeable_packages() + } + } + +-# Debian dpkg(8) completion ++# Debian dpkg(1) completion + # + _dpkg() + { +@@ -54,7 +54,7 @@ _dpkg() + case $prev in + -c|-i|-A|-I|-f|-e|-x|-X|-W|--install|--unpack|--record-avail| \ + --contents|--info|--fsys-tarfile|--field|--control|--extract| \ +- --show) ++ --vextract|--show) + _filedir '?(u|d)deb' + return 0 + ;; +@@ -85,7 +85,45 @@ _dpkg() + COMPREPLY=( $( compgen -W '$( _parse_help "$1" )' -- "$cur" ) ) + [[ $COMPREPLY == *= ]] && compopt -o nospace + } && +-complete -F _dpkg dpkg dpkg-deb dpkg-query ++complete -F _dpkg dpkg dpkg-query ++ ++# Debian dpkg-deb(1) completion ++# ++_dpkg_deb() ++{ ++ local cur prev words cword split ++ _init_completion -s || return ++ ++ _expand || return 0 ++ ++ local i=$cword ++ ++ # find the last option flag ++ if [[ $cur != -* ]]; then ++ while [[ $prev != -* && $i -ne 1 ]]; do ++ i=$((i-1)) ++ prev=${words[i-1]} ++ done ++ fi ++ ++ case $prev in ++ -c|-I|-W|-f|-e|-x|-X|-R|--contents|--info|--show|--field|--control| \ ++ --extract|--vextract|--raw-extract|--fsys-tarfile) ++ _filedir '?(u|d)deb' ++ return 0 ++ ;; ++ -b|--build) ++ _filedir -d ++ return 0 ++ ;; ++ esac ++ ++ $split && return ++ ++ COMPREPLY=( $( compgen -W '$( _parse_help "$1" )' -- "$cur" ) ) ++ [[ $COMPREPLY == *= ]] && compopt -o nospace ++} && ++complete -F _dpkg_deb dpkg-deb + + # Debian GNU dpkg-reconfigure(8) completion + # diff --git a/debian/patches/series b/debian/patches/series index 3d6bbf82..c3886fe9 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -5,3 +5,4 @@ 04-xine_add_more_formats.patch 05-fix_gcc_detection.patch 06-xpdf_support_compressed_pdf.patch +07-dpkg_support_raw-extract_vextract.patch |