diff options
author | Gabriel F. T. Gomes <gabriel@inconstante.net.br> | 2019-08-08 10:56:45 -0300 |
---|---|---|
committer | Gabriel F. T. Gomes <gabriel@inconstante.net.br> | 2019-08-12 08:20:04 -0300 |
commit | 0e285a5683698861e288897ec36159f49c5a50b1 (patch) | |
tree | 10ec533a689d65a0263fc058b5c24fbec4260b07 /debian/patches | |
parent | a77a24978ad1aeafc4f8dfe02202c9d9b4dfc8d1 (diff) | |
download | bash-completion-0e285a5683698861e288897ec36159f49c5a50b1.tar.gz |
Drop Debian patches that have been applied upstream
Diffstat (limited to 'debian/patches')
11 files changed, 0 insertions, 478 deletions
diff --git a/debian/patches/01-apt-get-Complete-install-package-versions.patch b/debian/patches/01-apt-get-Complete-install-package-versions.patch deleted file mode 100644 index eb1d6f2d..00000000 --- a/debian/patches/01-apt-get-Complete-install-package-versions.patch +++ /dev/null @@ -1,53 +0,0 @@ -From: Ville Skyttä <ville.skytta@iki.fi> -Subject: apt-get: Complete install package=versions -Origin: upstream, https://github.com/scop/bash-completion/commit/c664b07ac98bf46c0ea416161cef0a0dbe11ab50.patch -Bug-Debian: https://bugs.debian.org/640217 - ---- - completions/apt-get | 21 +++++++++++++++------ - 1 file changed, 15 insertions(+), 6 deletions(-) - -diff --git a/completions/apt-get b/completions/apt-get -index 32c4bcf8..df4a3d0b 100644 ---- a/completions/apt-get -+++ b/completions/apt-get -@@ -3,7 +3,7 @@ - _apt_get() - { - local cur prev words cword -- _init_completion || return -+ _init_completion -n = || return - - local special i - for (( i=0; i < ${#words[@]}-1; i++ )); do -@@ -29,13 +29,22 @@ _apt_get() - 2> /dev/null ) $( apt-cache dumpavail | \ - command grep "^Source: $cur" | sort -u | cut -f2 -d" " ) ) - ;; -- *) -- if [[ $special == install && $cur == */* ]]; then -+ install) -+ if [[ $cur == */* ]]; then - _filedir deb -- else -- COMPREPLY=( $( apt-cache --no-generate pkgnames "$cur" \ -- 2>/dev/null ) ) -+ return -+ elif [[ $cur == *=* ]]; then -+ COMPREPLY=( $( compgen -W "$( \ -+ apt-cache --no-generate show "${cur%%=*}" 2>/dev/null | -+ command sed -ne \ -+ 's/^Version:[[:space:]]*\([^[:space:]]\)/\1/p' )" \ -+ -- "${cur#*=}" ) ) -+ return - fi -+ ;;& -+ *) -+ COMPREPLY=( $( apt-cache --no-generate pkgnames "$cur" \ -+ 2>/dev/null ) ) - ;; - esac - return --- -2.16.2 - diff --git a/debian/patches/02-dpkg-source-Add-options.patch b/debian/patches/02-dpkg-source-Add-options.patch deleted file mode 100644 index d9283b9c..00000000 --- a/debian/patches/02-dpkg-source-Add-options.patch +++ /dev/null @@ -1,25 +0,0 @@ -From: Antonio Terceiro <terceiro@debian.org> -Subject: dpkg-source: Add --before-build --after-build --commit, and --print-format -Origin: upstream, https://github.com/scop/bash-completion/commit/1404d3f995649e1f70ffbb8239acd585e8246df4.patch -Bug-Debian: https://bugs.debian.org/756887 - ---- - completions/dpkg-source | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/completions/dpkg-source b/completions/dpkg-source -index 54403851..826d0f83 100644 ---- a/completions/dpkg-source -+++ b/completions/dpkg-source -@@ -10,7 +10,7 @@ _dpkg_source() - packopts="-c -l -F -V -T -D -U -W -E -sa -i -I -sk -sr -ss -sA -sK -sP \ - -sU -sR" - unpackopts="-sp -sn -su" -- options="-x -b $packopts $unpackopts" -+ options="-x -b --print-format --before-build --after-build --commit $packopts $unpackopts" - fields="Format Source Version Binary Maintainer Uploader Architecture \ - Standards-Version Build-Depends Files" - --- -2.16.2 - diff --git a/debian/patches/05-list-held-packages-in-dpkg.patch b/debian/patches/05-list-held-packages-in-dpkg.patch deleted file mode 100644 index 3e62c630..00000000 --- a/debian/patches/05-list-held-packages-in-dpkg.patch +++ /dev/null @@ -1,39 +0,0 @@ -From: Paul Wise <pabs@debian.org> -Subject: List held packages in dpkg -Origin: vendor, https://bugs.debian.org/907294 -Bug-Debian: https://bugs.debian.org/907294 -Forwarded: yes, https://github.com/scop/bash-completion/pull/250 - -The completion for dpkg -L/--listfiles does not list held packages when -grep-status (from dctrl-tools) is installed. This is because the -grep-status _comp_dpkg_purgeable_packages cares about the dpkg package -selection states (install/hold/deinstall/purge) while the other version -only cares about the dpkg package states (installed/unpacked/etc). - -There is a similar issue for the _comp_dpkg_installed_packages function. - -The fix for this is quite simple, just remove install/deinstall from -the arguments to the -FStatus options. - -diff --git a/completions/dpkg b/completions/dpkg -index 681d48a1..f5b79103 100644 ---- a/completions/dpkg -+++ b/completions/dpkg -@@ -3,7 +3,7 @@ - _have grep-status && { - _comp_dpkg_installed_packages() - { -- grep-status -P -e "^$1" -a -FStatus 'install ok installed' -n -s Package -+ grep-status -P -e "^$1" -a -FStatus 'ok installed' -n -s Package - } - } || { - _comp_dpkg_installed_packages() -@@ -19,7 +19,7 @@ _comp_dpkg_installed_packages() - _have grep-status && { - _comp_dpkg_purgeable_packages() - { -- grep-status -P -e "^$1" -a -FStatus 'install ok installed' -o -FStatus 'deinstall ok config-files' -n -s Package -+ grep-status -P -e "^$1" -a -FStatus 'ok installed' -o -FStatus 'ok config-files' -n -s Package - } - } || { - _comp_dpkg_purgeable_packages() diff --git a/debian/patches/08-completion-for-cvs-log.patch b/debian/patches/08-completion-for-cvs-log.patch deleted file mode 100644 index a28c47cb..00000000 --- a/debian/patches/08-completion-for-cvs-log.patch +++ /dev/null @@ -1,26 +0,0 @@ -From: Gabriel F. T. Gomes <gabriel@inconstante.eti.br> -Subject: Add completion for the cvs log command -Origin: vendor, https://bugs.debian.org/892080 -Bug-Debian: https://bugs.debian.org/892080 -Forwarded: yes, https://github.com/scop/bash-completion/pull/194 - -The 'cvs log' command takes two types of arguments: options and files. -As reported by a Debian user [1], completion with filenames is not -working. As a matter of fact, nor are completions with options. This -patch adds completions for filenames and options to 'cvs log'. - -[1] https://bugs.debian.org/892080 - -diff --git a/completions/cvs b/completions/cvs -index fee256f2..357841ad 100644 ---- a/completions/cvs -+++ b/completions/cvs -@@ -264,7 +264,7 @@ _cvs() - cvsroot) - _cvs_roots - ;; -- diff) -+ diff|log) - if [[ "$cur" == -* ]]; then - _cvs_command_options "$1" $mode - [[ $COMPREPLY == *= ]] && compopt -o nospace diff --git a/debian/patches/09-backport-to-fix-wildcard-completion.patch b/debian/patches/09-backport-to-fix-wildcard-completion.patch deleted file mode 100644 index 8c1a4e54..00000000 --- a/debian/patches/09-backport-to-fix-wildcard-completion.patch +++ /dev/null @@ -1,53 +0,0 @@ -commit 6ffde95c7ea257ff60cb51a263a8d33f4bb0898b -Author: dmerge <25472575+dmerge@users.noreply.github.com> -Date: Fri Apr 20 22:14:08 2018 -0700 - - _filedir: Refactor to remove heredoc-dependent loop - -diff --git a/bash_completion b/bash_completion -index 98d277bd..48fe5987 100644 ---- a/bash_completion -+++ b/bash_completion -@@ -553,12 +553,11 @@ _filedir() - _tilde "$cur" || return - - local -a toks -- local x tmp -+ local x reset - -- x=$( compgen -d -- "$cur" ) && -- while read -r tmp; do -- toks+=( "$tmp" ) -- done <<< "$x" -+ reset=$(shopt -po noglob); set -o noglob -+ toks=( $( compgen -d -- "$cur" ) ) -+ eval $reset - - if [[ "$1" != -d ]]; then - local quoted -@@ -567,17 +566,16 @@ _filedir() - # Munge xspec to contain uppercase version too - # http://thread.gmane.org/gmane.comp.shells.bash.bugs/15294/focus=15306 - local xspec=${1:+"!*.@($1|${1^^})"} -- x=$( compgen -f -X "$xspec" -- $quoted ) && -- while read -r tmp; do -- toks+=( "$tmp" ) -- done <<< "$x" -+ reset=$(shopt -po noglob); set -o noglob -+ toks+=( $( compgen -f -X "$xspec" -- $quoted ) ) -+ eval $reset - - # Try without filter if it failed to produce anything and configured to -- [[ -n ${COMP_FILEDIR_FALLBACK:-} && -n "$1" && ${#toks[@]} -lt 1 ]] && \ -- x=$( compgen -f -- $quoted ) && -- while read -r tmp; do -- toks+=( "$tmp" ) -- done <<< "$x" -+ [[ -n ${COMP_FILEDIR_FALLBACK:-} && -n "$1" && ${#toks[@]} -lt 1 ]] && { -+ reset=$(shopt -po noglob); set -o noglob -+ toks+=( $( compgen -f -- $quoted ) ) -+ eval $reset -+ } - fi - - if [[ ${#toks[@]} -ne 0 ]]; then diff --git a/debian/patches/10-reimplement-known-hosts-file-parsing.patch b/debian/patches/10-reimplement-known-hosts-file-parsing.patch deleted file mode 100644 index f7db7ee7..00000000 --- a/debian/patches/10-reimplement-known-hosts-file-parsing.patch +++ /dev/null @@ -1,102 +0,0 @@ -commit 71ac42b98c0eba39819fb8478d6443032c6ef6f1 -Author: Ville Skyttä <ville.skytta@iki.fi> -Date: Mon Mar 19 18:58:09 2018 +0200 - - _known_hosts_real: Reimplement known hosts file parsing in pure bash - -diff --git a/bash_completion b/bash_completion -index ca84b01d..98d277bd 100644 ---- a/bash_completion -+++ b/bash_completion -@@ -1482,9 +1482,9 @@ _included_ssh_config_files() - # Return: Completions, starting with CWORD, are added to COMPREPLY[] - _known_hosts_real() - { -- local configfile flag prefix -- local cur curd awkcur user suffix aliases i host ipv4 ipv6 -- local -a kh khd config -+ local configfile flag prefix OIFS=$IFS -+ local cur user suffix aliases i host ipv4 ipv6 -+ local -a kh tmpkh khd config - - # TODO remove trailing %foo from entries - -@@ -1523,8 +1523,7 @@ _known_hosts_real() - - # Known hosts files from configs - if [[ ${#config[@]} -gt 0 ]]; then -- local OIFS=$IFS IFS=$'\n' j -- local -a tmpkh -+ local IFS=$'\n' j - # expand paths (if present) to global and user known hosts files - # TODO(?): try to make known hosts files with more than one consecutive - # spaces in their name work (watch out for ~ expansion -@@ -1561,35 +1560,31 @@ _known_hosts_real() - - # If we have known_hosts files to use - if [[ ${#kh[@]} -gt 0 || ${#khd[@]} -gt 0 ]]; then -- # Escape slashes and dots in paths for awk -- awkcur=${cur//\//\\\/} -- awkcur=${awkcur//\./\\\.} -- curd=$awkcur -- -- if [[ "$awkcur" == [0-9]*[.:]* ]]; then -- # Digits followed by a dot or a colon - just search for that -- awkcur="^$awkcur[.:]*" -- elif [[ "$awkcur" == [0-9]* ]]; then -- # Digits followed by no dot or colon - search for digits followed -- # by a dot or a colon -- awkcur="^$awkcur.*[.:]" -- elif [[ -z $awkcur ]]; then -- # A blank - search for a dot, a colon, or an alpha character -- awkcur="[a-z.:]" -- else -- awkcur="^$awkcur" -- fi -- - if [[ ${#kh[@]} -gt 0 ]]; then -- # FS needs to look for a comma separated list -- COMPREPLY+=( $( awk 'BEGIN {FS=","} -- /^\s*[^|\#]/ { -- sub("^@[^ ]+ +", ""); \ -- sub(" .*$", ""); \ -- for (i=1; i<=NF; ++i) { \ -- sub("^\\[", "", $i); sub("\\](:[0-9]+)?$", "", $i); \ -- if ($i !~ /[*?]/ && $i ~ /'"$awkcur"'/) {print $i} \ -- }}' "${kh[@]}" 2>/dev/null ) ) -+ # https://man.openbsd.org/sshd.8#SSH_KNOWN_HOSTS_FILE_FORMAT -+ for i in "${kh[@]}"; do -+ while read -ra tmpkh; do -+ set -- "${tmpkh[@]}" -+ # Skip entries starting with | (hashed) and # (comment) -+ [[ $1 == [\|\#]* ]] && continue -+ # Ignore leading @foo (markers) -+ [[ $1 == @* ]] && shift -+ # Split entry on commas -+ local IFS=, -+ for host in $1; do -+ # Skip hosts containing wildcards -+ [[ $host == *[*?]* ]] && continue -+ # Remove leading [ -+ host="${host#[}" -+ # Remove trailing ] + optional :port -+ host="${host%]?(:+([0-9]))}" -+ # Add host to candidates -+ COMPREPLY+=( $host ) -+ done -+ IFS=$OIFS -+ done < "$i" -+ done -+ COMPREPLY=( $( compgen -W '${COMPREPLY[@]}' -- "$cur" ) ) - fi - if [[ ${#khd[@]} -gt 0 ]]; then - # Needs to look for files called -@@ -1597,7 +1592,7 @@ _known_hosts_real() - # dont fork any processes, because in a cluster environment, - # there can be hundreds of hostkeys - for i in "${khd[@]}" ; do -- if [[ "$i" == *key_22_$curd*.pub && -r "$i" ]]; then -+ if [[ "$i" == *key_22_$cur*.pub && -r "$i" ]]; then - host=${i/#*key_22_/} - host=${host/%.pub/} - COMPREPLY+=( $host ) diff --git a/debian/patches/12-tar-support-completions-for-zstd-compression.patch b/debian/patches/12-tar-support-completions-for-zstd-compression.patch deleted file mode 100644 index d81f0ebd..00000000 --- a/debian/patches/12-tar-support-completions-for-zstd-compression.patch +++ /dev/null @@ -1,57 +0,0 @@ -From: Gabriel F. T. Gomes <gabriel@inconstante.eti.br> -Subject: tar: Support completions for zstd compression extensions -Origin: vendor, https://bugs.debian.org/913949 -Bug-Debian: https://bugs.debian.org/913949 -Forwarded: yes, https://github.com/scop/bash-completion/pull/255 - -Since upstream version 1.30.90, GNU tar supports zstd compression [1]. -According to the same NEWS entry, the extensions for archive names are -`.zst' and `.tzst'. This patch adds support for completing these -extensions. - -This is the output of the completions after the patch: - - $ ls[ENTER] - bla.gem.gz bla.invalid.gz bla.spkg.gz bla.tar.gz bla.tgz - bla.gem.zst bla.invalid.zst bla.spkg.zst bla.tar.zst bla.tzst - $ tar -tf bla.[TAB] - bla.gem.gz bla.spkg.gz bla.tar.gz bla.tgz - bla.gem.zst bla.spkg.zst bla.tar.zst bla.tzst - $ tar -ztf bla.[TAB] - bla.gem.gz bla.spkg.gz bla.tar.gz bla.tgz - -Since tar does not provide a one-character shortcut for zstd -compression, I wasn't able to filter only .zst files: - - $ tar --zstd -tf bla.[TAB] - bla.gem.gz bla.spkg.gz bla.tar.gz bla.tgz - bla.gem.zst bla.spkg.zst bla.tar.zst bla.tzst - -The request came from Adam Borowski via a Debian bug [2]. - -[1] http://git.savannah.gnu.org/cgit/tar.git/commit/NEWS?id=688924d2a8e1cefb2a5c6c5e562391b5bcfadcb2 - -[2] https://bugs.debian.org/913949 ---- - completions/tar | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/completions/tar b/completions/tar -index 49265ad4..f6983d50 100644 ---- a/completions/tar -+++ b/completions/tar -@@ -433,9 +433,9 @@ __tar_cleanup_prev() - - __tar_detect_ext() - { -- local tars='@(@(tar|gem|spkg)?(.@(Z|[bgx]z|bz2|lz?(ma|o)))|t@([abglx]z|b?(z)2))' -+ local tars='@(@(tar|gem|spkg)?(.@(Z|[bgx]z|bz2|lz?(ma|o)|zst))|t@([abglx]z|b?(z)2|zst))' - ext="$tars" -- regex='\(\(tar\|gem\|spkg\)\(\.\(Z\|[bgx]z\|bz2\|lz\(ma\|o\)\?\)\)\?\|t\([abglx]z\|bz\?2\)\)' -+ regex='\(\(tar\|gem\|spkg\)\(\.\(Z\|[bgx]z\|bz2\|lz\(ma\|o\)\?\|zst\)\)\?\|t\([abglx]z\|bz\?2\|zst\)\)' - - case "$tar_mode_arg" in - --*) --- -2.19.1 - diff --git a/debian/patches/14-bug-550676-fallback-to-path-completion.patch b/debian/patches/14-bug-550676-fallback-to-path-completion.patch deleted file mode 100644 index 6f51af5b..00000000 --- a/debian/patches/14-bug-550676-fallback-to-path-completion.patch +++ /dev/null @@ -1,62 +0,0 @@ -From: "Gabriel F. T. Gomes" <gabriel@inconstante.eti.br> -Subject: _filedir_xspec: Fallback to suggesting all files if requested -Origin: vendor, https://bugs.debian.org/550676 -Bug-Debian: https://bugs.debian.org/550676 -Forwarded: yes, https://github.com/scop/bash-completion/pull/260 - -When completions generated by _filedir fail to produce an output with -xspec, they fallback to completing without any filters, provided that -the environment variable COMP_FILEDIR_FALLBACK is set and not-null. - -This patch adds the same behavior to _filedir_xspec, so that it works -for the use case presented in message #45 in Debian bug #550676 [1], -as suggested in message #55 [2]. - -Before this patch, unzip completion would not complete: - - $ ls[ENTER] - file file.ext - - $ unzip [TAB][TAB][...] - (no output) - -After this patch, it completes: - - $ unzip [TAB] - file file.ext - -In both cases, when a *.zip file exists, completion favours it: - - $ ls[ENTER] - file file.ext file.zip - - $ unzip [TAB] - $ unzip file.zip [CURSOR] - -[1] https://bugs.debian.org/550676#45 -[2] https://bugs.debian.org/550676#55 ---- - bash_completion | 7 +++++++ - 1 file changed, 7 insertions(+) - -diff --git a/bash_completion b/bash_completion -index 546cc39b..ee65196e 100644 ---- a/bash_completion -+++ b/bash_completion -@@ -1938,6 +1938,13 @@ _filedir_xspec() - } - )) - -+ # Try without filter if it failed to produce anything and configured to -+ [[ -n ${COMP_FILEDIR_FALLBACK:-} && ${#toks[@]} -lt 1 ]] && { -+ local reset=$(shopt -po noglob); set -o noglob -+ toks+=( $( compgen -f -- "$(quote_readline "$cur")" ) ) -+ IFS=' '; $reset; IFS=$'\n' -+ } -+ - if [[ ${#toks[@]} -ne 0 ]]; then - compopt -o filenames - COMPREPLY=( "${toks[@]}" ) --- -2.20.0.rc1 - diff --git a/debian/patches/15-bug-923167-fix-bad-array-subscript.patch b/debian/patches/15-bug-923167-fix-bad-array-subscript.patch deleted file mode 100644 index d8bcc9cd..00000000 --- a/debian/patches/15-bug-923167-fix-bad-array-subscript.patch +++ /dev/null @@ -1,20 +0,0 @@ -commit 583562b9e56207bd428497ceb96df4e1f1f53158 -Author: Ville Skyttä <ville.skytta@iki.fi> -Date: Sun May 6 21:41:48 2018 +0200 - - __load_completion: Avoid bad array subscript on "commands" ending with slash - - Closes #209 - -diff --git a/bash_completion b/bash_completion -index 9a9eae0b..442c0757 100644 ---- a/bash_completion -+++ b/bash_completion -@@ -2019,6 +2019,7 @@ __load_completion() - { - local -a dirs=( ${BASH_COMPLETION_USER_DIR:-${XDG_DATA_HOME:-$HOME/.local/share}/bash-completion}/completions ) - local OIFS=$IFS IFS=: dir cmd="${1##*/}" compfile -+ [[ -n $cmd ]] || return 1 - for dir in ${XDG_DATA_DIRS:-/usr/local/share:/usr/share}; do - dirs+=( $dir/bash-completion/completions ) - done diff --git a/debian/patches/99-use-install-data-hook.patch b/debian/patches/99-use-install-data-hook.patch deleted file mode 100644 index d20e2e34..00000000 --- a/debian/patches/99-use-install-data-hook.patch +++ /dev/null @@ -1,31 +0,0 @@ -From: =?UTF-8?q?Ville=20Skytt=C3=A4?= <ville.skytta@iki.fi> -Date: Fri, 25 May 2018 17:38:59 +0200 -Subject: [PATCH] completions/Makefile.am: Use install-data-hook, not - install-data-local -Bug-Debian: https://bugs.debian.org/910128 -Forwarded: https://github.com/scop/bash-completion/issues/212 -Origin: https://github.com/scop/bash-completion/commit/ee6b37ad7ff5b309cbb9b886a871252abd9398fa - --hook is run after the main rule, while -local might end up before. -https://www.gnu.org/software/automake/manual/html_node/Extending.html#index-hook-targets - -Closes #212 ---- - completions/Makefile.am | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -Index: bash-completion-2.8/completions/Makefile.am -=================================================================== ---- bash-completion-2.8.orig/completions/Makefile.am -+++ bash-completion-2.8/completions/Makefile.am -@@ -993,8 +993,8 @@ symlinks: $(targetdir) $(DATA) - all-local: targetdir = . - all-local: symlinks - --install-data-local: targetdir = $(DESTDIR)$(bashcompdir) --install-data-local: symlinks -+install-data-hook: targetdir = $(DESTDIR)$(bashcompdir) -+install-data-hook: symlinks - - check-local: - ret=0 diff --git a/debian/patches/series b/debian/patches/series index 517a4f31..64120c80 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -1,16 +1,6 @@ 00-fix_quote_readline_by_ref.patch -01-apt-get-Complete-install-package-versions.patch -02-dpkg-source-Add-options.patch 04-xine_add_more_formats.patch -05-list-held-packages-in-dpkg.patch 06-xpdf_support_compressed_pdf.patch 07-dpkg_support_raw-extract_vextract.patch -08-completion-for-cvs-log.patch -09-backport-to-fix-wildcard-completion.patch -10-reimplement-known-hosts-file-parsing.patch 11-add-completions-for-openrc-rc-service.patch -12-tar-support-completions-for-zstd-compression.patch 13-fix-perl-completions-with-a-space-between-option-and.patch -14-bug-550676-fallback-to-path-completion.patch -15-bug-923167-fix-bad-array-subscript.patch -99-use-install-data-hook.patch |