From 2e9a1e6a26e180e2dc610a2515bd0f4639c9cab7b0a13abd63b1f73f1df58d07 Mon Sep 17 00:00:00 2001 From: "Dr. Werner Fink" Date: Wed, 14 Dec 2016 11:49:24 +0000 Subject: [PATCH] Update to version 2.4 OBS-URL: https://build.opensuse.org/package/show/shells/bash-completion?expand=0&rev=78 --- FOO-dir-completion-boo905348.patch | 31 +-- LVM-completion-bsc946875.patch | 136 +++------- PS1-completion-boo903362.patch | 28 +-- backtick-completion-boo940835.patch | 6 +- backticks-bsc963140.patch | 10 +- bash-completion-2.1.tar.bz2 | 3 - ...ion-2.1.patch => bash-completion-2.4.patch | 18 +- bash-completion-2.4.tar.xz | 3 + bash-completion-doc.changes | 234 ++++++++++++++++++ bash-completion-doc.spec | 14 +- bash-completion.changes | 234 ++++++++++++++++++ bash-completion.spec | 20 +- init-completion-boo922758.patch | 15 -- ls-completion-boo889319.patch | 27 +- pushd-completion-bnc818365.patch | 11 - respect-variables-boo940837.patch | 4 +- rm-completion-smart-boo958462.patch | 20 +- sh-script-completion-boo977336.patch | 61 ++--- 18 files changed, 595 insertions(+), 280 deletions(-) delete mode 100644 bash-completion-2.1.tar.bz2 rename bash-completion-2.1.patch => bash-completion-2.4.patch (56%) create mode 100644 bash-completion-2.4.tar.xz delete mode 100644 init-completion-boo922758.patch delete mode 100644 pushd-completion-bnc818365.patch diff --git a/FOO-dir-completion-boo905348.patch b/FOO-dir-completion-boo905348.patch index ccdb1c2..76220c6 100644 --- a/FOO-dir-completion-boo905348.patch +++ b/FOO-dir-completion-boo905348.patch @@ -1,29 +1,18 @@ --- - bash_completion | 51 ++++++++++++++++++++++++++++++++++++++++++++++++--- - 1 file changed, 48 insertions(+), 3 deletions(-) + bash_completion | 47 ++++++++++++++++++++++++++++++++++++++++++++++- + 1 file changed, 46 insertions(+), 1 deletion(-) --- bash_completion -+++ bash_completion 2015-03-18 12:43:01.808831000 +0000 -@@ -558,15 +558,16 @@ _quote_readline_by_ref() - # - _filedir() - { -- local i IFS=$'\n' xspec -+ local IFS=$'\n' xspec ++++ bash_completion 2016-12-14 09:23:57.869438668 +0000 +@@ -559,6 +559,7 @@ _filedir() + local IFS=$'\n' - _tilde "$cur" || return 0 -+ _dollar "$cur" || return 0 + _tilde "$cur" || return ++ _dollar "$cur" || return local -a toks - local quoted x tmp - - _quote_readline_by_ref "$cur" quoted -- x=$( compgen -d -- "$quoted" ) && -+ x=$( compgen -d -- "$cur" ) && - while read -r tmp; do - toks+=( "$tmp" ) - done <<< "$x" -@@ -937,6 +938,41 @@ _tilde() + local x tmp +@@ -986,6 +987,41 @@ _tilde() return $result } @@ -65,7 +54,7 @@ # Expand variable starting with tilde (~) # We want to expand ~foo/... to /home/foo/... to avoid problems when -@@ -1576,7 +1612,16 @@ complete -F _known_hosts traceroute trac +@@ -1634,7 +1670,16 @@ complete -F _known_hosts traceroute trac _cd() { local cur prev words cword diff --git a/LVM-completion-bsc946875.patch b/LVM-completion-bsc946875.patch index ea32860..3e1a905 100644 --- a/LVM-completion-bsc946875.patch +++ b/LVM-completion-bsc946875.patch @@ -18,122 +18,60 @@ Signed-off-by: Liuhua Wang Reviewed-by: Lidong Zhong + + + + diff --git a/completions/lvm b/completions/lvm --- a/completions/lvm +++ b/completions/lvm -@@ -1,19 +1,57 @@ - # bash completion for lvm -*- shell-script -*- +@@ -6,27 +6,41 @@ _lvm_filedir() + _filedir + } -+_lvm_filedir() ++_lvm_verbose() +{ -+ cur=${cur:-/dev/} -+ _filedir ++ local silent=$(sed -n -e "s|^[ \t]*silent[ \t]*=[ \t]*\([01]\)|\1|p" /etc/lvm/lvm.conf) ++ test ${silent:-0} -eq 1 +} + _lvm_volumegroups() { -+ local silent -+ silent=$(sed -n -e "s|^[ \t]*silent[ \t]*=[ \t]*\([01]\)|\1|p" /etc/lvm/lvm.conf) -+ silent=${silent:-0} -+ [ $silent -eq 1 ] && sed -i "s|\(^[ \t]*silent[ \t]*=[ \t]*\)[01].*$|\10|" /etc/lvm/lvm.conf -+ - COMPREPLY=( $(compgen -W "$( vgscan 2>/dev/null | \ - sed -n -e 's|.*Found.*"\(.*\)".*$|\1|p' )" -- "$cur" ) ) -+ -+ [ $silent -eq 1 ] && sed -i "s|\(^[ \t]*silent[ \t]*=[ \t]*\)[01].*$|\11|" /etc/lvm/lvm.conf -+} -+ -+_lvm_physicalvolumes_all() -+{ -+ local silent -+ silent=$(sed -n -e "s|^[ \t]*silent[ \t]*=[ \t]*\([01]\)|\1|p" /etc/lvm/lvm.conf) -+ silent=${silent:-0} -+ [ $silent -eq 1 ] && sed -i "s|\(^[ \t]*silent[ \t]*=[ \t]*\)[01].*$|\10|" /etc/lvm/lvm.conf -+ -+ COMPREPLY=( $(compgen -W "$( pvscan 2>/dev/null | \ -+ sed -n -e 's|^.*PV \([^ ]*\) .*|\1|p' )" -- "$cur" ) ) -+ -+ [ $silent -eq 1 ] && sed -i "s|\(^[ \t]*silent[ \t]*=[ \t]*\)[01].*$|\11|" /etc/lvm/lvm.conf +- COMPREPLY=( $(compgen -W "$( vgscan 2>/dev/null | \ ++ local verbose ++ _lvm_verbose && verbose=-v ++ COMPREPLY=( $(compgen -W "$( vgscan $verbose 2>/dev/null | \ + command sed -n -e 's|.*Found.*"\(.*\)".*$|\1|p' )" -- "$cur" ) ) + } + + _lvm_physicalvolumes_all() + { +- COMPREPLY=( $(compgen -W "$( pvscan 2>/dev/null | \ ++ local verbose ++ _lvm_verbose && verbose=-v ++ COMPREPLY=( $(compgen -W "$( pvscan $verbose 2>/dev/null | \ + command sed -n -e 's|^.*PV \([^ ]*\) .*|\1|p' )" -- "$cur" ) ) } _lvm_physicalvolumes() { -+ local silent -+ silent=$(sed -n -e "s|^[ \t]*silent[ \t]*=[ \t]*\([01]\)|\1|p" /etc/lvm/lvm.conf) -+ silent=${silent:-0} -+ [ $silent -eq 1 ] && sed -i "s|\(^[ \t]*silent[ \t]*=[ \t]*\)[01].*$|\10|" /etc/lvm/lvm.conf -+ - COMPREPLY=( $(compgen -W "$( pvscan 2>/dev/null | \ - sed -n -e 's|^.*PV \(.*\) VG.*$|\1|p' )" -- "$cur" ) ) -+ -+ [ $silent -eq 1 ] && sed -i "s|\(^[ \t]*silent[ \t]*=[ \t]*\)[01].*$|\11|" /etc/lvm/lvm.conf +- COMPREPLY=( $(compgen -W "$( pvscan 2>/dev/null | \ ++ local verbose ++ _lvm_verbose && verbose=-v ++ COMPREPLY=( $(compgen -W "$( pvscan $verbose 2>/dev/null | \ + command sed -n -e 's|^.*PV \(.*\) VG.*$|\1|p' )" -- "$cur" ) ) } _lvm_logicalvolumes() { -+ local silent -+ silent=$(sed -n -e "s|^[ \t]*silent[ \t]*=[ \t]*\([01]\)|\1|p" /etc/lvm/lvm.conf) -+ silent=${silent:-0} -+ [ $silent -eq 1 ] && sed -i "s|\(^[ \t]*silent[ \t]*=[ \t]*\)[01].*$|\10|" /etc/lvm/lvm.conf -+ - COMPREPLY=( $(compgen -W "$( lvscan 2>/dev/null | \ - sed -n -e "s|^.*'\(.*\)'.*$|\1|p" )" -- "$cur" ) ) +- COMPREPLY=( $(compgen -W "$( lvscan 2>/dev/null | \ ++ local verbose ++ _lvm_verbose && verbose=-v ++ COMPREPLY=( $(compgen -W "$( lvscan $verbose 2>/dev/null | \ + command sed -n -e "s|^.*'\(.*\)'.*$|\1|p" )" -- "$cur" ) ) if [[ $cur == /dev/mapper/* ]]; then -@@ -23,6 +61,8 @@ _lvm_logicalvolumes() - [[ ${COMPREPLY[i]} == */control ]] && unset COMPREPLY[i] - done - fi -+ -+ [ $silent -eq 1 ] && sed -i "s|\(^[ \t]*silent[ \t]*=[ \t]*\)[01].*$|\11|" /etc/lvm/lvm.conf - } - - _lvm_units() -@@ -96,7 +136,7 @@ _pvs() - if [[ "$cur" == -* ]]; then - COMPREPLY=( $( compgen -W '$( _parse_usage "$1" --help )' -- "$cur" ) ) - else -- _lvm_physicalvolumes -+ _lvm_physicalvolumes_all - fi - } && - complete -F _pvs pvs -@@ -116,7 +156,7 @@ _pvdisplay() - if [[ "$cur" == -* ]]; then - COMPREPLY=( $( compgen -W '$( _parse_usage "$1" --help )' -- "$cur" ) ) - else -- _lvm_physicalvolumes -+ _lvm_physicalvolumes_all - fi - } && - complete -F _pvdisplay pvdisplay -@@ -136,7 +176,7 @@ _pvchange() - if [[ "$cur" == -* ]]; then - COMPREPLY=( $( compgen -W '$( _parse_usage "$1" --help )' -- "$cur" ) ) - else -- _lvm_physicalvolumes -+ _lvm_physicalvolumes_all - fi - } && - complete -F _pvchange pvchange -@@ -168,7 +208,7 @@ _pvcreate() - if [[ "$cur" == -* ]]; then - COMPREPLY=( $( compgen -W '$( _parse_usage "$1" --help )' -- "$cur" ) ) - else -- _lvm_physicalvolumes -+ _lvm_filedir - fi - } && - complete -F _pvcreate pvcreate -@@ -206,7 +246,7 @@ _pvremove() - if [[ "$cur" == -* ]]; then - COMPREPLY=( $( compgen -W '$( _parse_usage "$1" --help )' -- "$cur" ) ) - else -- _lvm_physicalvolumes -+ _lvm_physicalvolumes_all - fi - } && - complete -F _pvremove pvremove -@@ -322,7 +362,7 @@ _vgcreate() + _filedir +@@ -394,7 +408,7 @@ _vgreduce() if [[ $args -eq 0 ]]; then _lvm_volumegroups else @@ -142,7 +80,7 @@ diff --git a/completions/lvm b/completions/lvm fi fi } && -@@ -412,7 +452,7 @@ _vgextend() +@@ -709,7 +723,7 @@ _lvcreate() if [[ $args -eq 0 ]]; then _lvm_volumegroups else diff --git a/PS1-completion-boo903362.patch b/PS1-completion-boo903362.patch index 4341e73..72b6958 100644 --- a/PS1-completion-boo903362.patch +++ b/PS1-completion-boo903362.patch @@ -1,25 +1,13 @@ --- - bash_completion.sh.in | 8 ++++---- - 1 file changed, 4 insertions(+), 4 deletions(-) + bash_completion.sh.in | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) --- bash_completion.sh.in -+++ bash_completion.sh.in 2014-11-17 12:17:01.505519084 +0000 -@@ -1,9 +1,10 @@ ++++ bash_completion.sh.in 2016-12-14 08:58:03.572501304 +0000 +@@ -1,5 +1,5 @@ # Check for interactive bash and that we haven't already been sourced. --[ -z "$BASH_VERSION" -o -z "$PS1" -o -n "$BASH_COMPLETION_COMPAT_DIR" ] && return -+[ -z "$BASH_VERSION" ] && return -+[ -n "$BASH_COMPLETION_COMPAT_DIR" ] && return -+[[ $- =~ i ]] || return +-if [ -n "${BASH_VERSION-}" -a -n "${PS1-}" -a -z "${BASH_COMPLETION_COMPAT_DIR-}" ]; then ++if [[ -n "${BASH_VERSION-}" && $- =~ i && -z "${BASH_COMPLETION_COMPAT_DIR-}" ]]; then - # Check for recent enough version of bash. --bash=${BASH_VERSION%.*}; bmajor=${bash%.*}; bminor=${bash#*.} --if [ $bmajor -gt 4 ] || [ $bmajor -eq 4 -a $bminor -ge 1 ]; then -+if [ ${BASH_VERSINFO[0]} -gt 4 ] || [ ${BASH_VERSINFO[0]} -eq 4 -a ${BASH_VERSINFO[1]} -ge 1 ]; then - [ -r "${XDG_CONFIG_HOME:-$HOME/.config}/bash_completion" ] && \ - . "${XDG_CONFIG_HOME:-$HOME/.config}/bash_completion" - if shopt -q progcomp && [ -r @pkgdatadir@/bash_completion ]; then -@@ -11,4 +12,3 @@ if [ $bmajor -gt 4 ] || [ $bmajor -eq 4 - . @pkgdatadir@/bash_completion - fi - fi --unset bash bmajor bminor + # Check for recent enough version of bash. + if [ ${BASH_VERSINFO[0]} -gt 4 ] || \ diff --git a/backtick-completion-boo940835.patch b/backtick-completion-boo940835.patch index 4c60e0c..8a88e1e 100644 --- a/backtick-completion-boo940835.patch +++ b/backtick-completion-boo940835.patch @@ -3,8 +3,8 @@ 1 file changed, 10 insertions(+), 5 deletions(-) --- bash_completion -+++ bash_completion 2015-08-13 06:50:46.873519910 +0000 -@@ -945,16 +945,21 @@ _tilde() ++++ bash_completion 2016-12-14 09:32:27.123314170 +0000 +@@ -994,16 +994,21 @@ _tilde() _dollar() { local s="" @@ -30,7 +30,7 @@ \$\{*) COMPREPLY=($(compgen -v -P '${' -S "}$s" -- ${1#??})) ;; \$*) -@@ -966,7 +971,7 @@ _dollar() +@@ -1015,7 +1020,7 @@ _dollar() if ((${#COMPREPLY[@]} > 0)) ; then ((${#COMPREPLY[@]} == 1)) && eval COMPREPLY=\(${COMPREPLY[@]}\) diff --git a/backticks-bsc963140.patch b/backticks-bsc963140.patch index 4702721..3b732da 100644 --- a/backticks-bsc963140.patch +++ b/backticks-bsc963140.patch @@ -1,10 +1,10 @@ --- - bash-completion-2.1/bash_completion | 20 ++++++++++++++------ + bash-completion-2.4/bash_completion | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) ---- bash-completion-2.1/bash_completion -+++ bash-completion-2.1/bash_completion -@@ -952,13 +952,21 @@ _dollar() +--- bash-completion-2.4/bash_completion ++++ bash-completion-2.4/bash_completion 2016-12-14 10:29:18.799435205 +0000 +@@ -1001,13 +1001,21 @@ _dollar() [[ "$COMP_LINE" == cd* ]] && s="/" case "$1" in @@ -30,7 +30,7 @@ ;; \$\{*) COMPREPLY=($(compgen -v -P '${' -S "}$s" -- ${1#??})) ;; -@@ -971,8 +979,8 @@ _dollar() +@@ -1020,8 +1028,8 @@ _dollar() if ((${#COMPREPLY[@]} > 0)) ; then ((${#COMPREPLY[@]} == 1)) && eval COMPREPLY=\(${COMPREPLY[@]}\) diff --git a/bash-completion-2.1.tar.bz2 b/bash-completion-2.1.tar.bz2 deleted file mode 100644 index e733dd1..0000000 --- a/bash-completion-2.1.tar.bz2 +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:2b606804a7d5f823380a882e0f7b6c8a37b0e768e72c3d4107c51fbe8a46ae4f -size 265329 diff --git a/bash-completion-2.1.patch b/bash-completion-2.4.patch similarity index 56% rename from bash-completion-2.1.patch rename to bash-completion-2.4.patch index b2b6416..2ded4e9 100644 --- a/bash-completion-2.1.patch +++ b/bash-completion-2.4.patch @@ -1,14 +1,18 @@ +--- + bash_completion | 11 ++++++----- + 1 file changed, 6 insertions(+), 5 deletions(-) + --- bash_completion -+++ bash_completion 2013-04-23 14:12:26.449469882 +0000 -@@ -1791,12 +1791,13 @@ _longopt() ++++ bash_completion 2016-12-14 08:24:22.136927047 +0000 +@@ -1849,12 +1849,13 @@ _longopt() fi } # makeinfo and texi2dvi are defined elsewhere. --complete -F _longopt a2ps awk base64 bash bc bison cat colordiff cp csplit \ -- cut date df diff dir du enscript env expand fmt fold gperf \ -+complete -F _longopt -o filenames a2ps awk base64 bash bc bison cat colordiff cp csplit \ -+ cut date df diff dir du enscript expand fmt fold gperf \ - grep grub head indent irb ld ldd less ln ls m4 md5sum mkdir mkfifo mknod \ +-complete -F _longopt a2ps awk base64 bash bc bison cat chroot colordiff cp \ +- csplit cut date df diff dir du enscript env expand fmt fold gperf \ ++complete -F _longopt -o filenames a2ps awk base64 bash bc bison cat chroot colordiff cp \ ++ csplit cut date df diff dir du enscript expand fmt fold gperf \ + grep grub head irb ld ldd less ln ls m4 md5sum mkdir mkfifo mknod \ - mv netstat nl nm objcopy objdump od paste pr ptx readelf rm rmdir \ - sed seq sha{,1,224,256,384,512}sum shar sort split strip sum tac tail tee \ - texindex touch tr uname unexpand uniq units vdir wc who diff --git a/bash-completion-2.4.tar.xz b/bash-completion-2.4.tar.xz new file mode 100644 index 0000000..4143aa0 --- /dev/null +++ b/bash-completion-2.4.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c0f76b5202fec9ef8ffba82f5605025ca003f27cfd7a85115f838ba5136890f6 +size 276148 diff --git a/bash-completion-doc.changes b/bash-completion-doc.changes index 9e336ad..72417ee 100644 --- a/bash-completion-doc.changes +++ b/bash-completion-doc.changes @@ -1,3 +1,237 @@ +------------------------------------------------------------------- +Wed Dec 14 10:46:27 UTC 2016 - werner@suse.de + +- Change upstream home to https://github.com/scop/bash-completion +- Update do verion 2.4 + * xetex, xelatex, luatex, lualatex: Associate with tex files + * Support pod document files for perldoc (#39) + * tipc: add tipc completions + * rpm: Offer --filetriggers with -q + * javadoc: Add bunch of option arg (non)completions + * lrzip: Add -m arg noncompletion + * pypy*: Add basic --jit arg completion + * pypy3: Alias to python + * hcitool,svcadm,tar: Spelling fixes + * tipc: Invoke ls with "command" + * tipc: Indentation fix + * abook: Parse long options from command including full path + * pyvenv: New completion + * chroot: New (generic long options) completion, see #38 + * aptitude: List packages using _apt_cache_packages, fixes #33 + * vncviewer: Cleanup shopt use, drop an eval + * make: Avoid a grep + * rpm: Fix --whatenhances arg completion + * aspell, minicom, mysql: Replace use of ls with printf + * The BitKeeper completion used the wrong set of commands + * Completion for python zip archives + * lvm: pvcreate should be able to use all block devcices + * lvm: fix all commands that should get all PVs + * tar: Detect GNU/other from --version only once per session + * tar: Remove unused variable + * tar: Fix GNU tar help output parsing regex, fixes #15 + * tar: Don't write to /tmp/jetel + * python: Simplify code + * python: Complete all files also after -m + * python: Don't offer options after -c + * python: Complete all files only if -c is before current word + * unzip, zipinfo: Complete on *.pyz + * _lvm: using a single-pattern case and invoking function according + to words[1] + * lvm: _lvm_count_args parameter must be quoted in order to failglob + not to complain + * gendiff: Quoting suffix pattern to avoid triggering failglob + * ssh-add, ssh-keygen: -? needs to be quoted under failglob (Alioth: + #314709) + * Refactor bts and uscan, since they use common functions + * uscan: New completion, thanks to Federico Ceratto + * bts: New completion, thanks to Federico Ceratto. + * nmcli completion was integrated upstream + * ssh-add, ssh-keygen: -? needs to be quoted under failglob (take 2) + (Alioth: #314709) + * umount: Fix mount points escaping/unescaping with Bash-4.3 + * slapt-src: Handle --config=FILE option properly + * sbopkg, slapt-{get,src}: expand tilde in config file name + * slapt-{get,src}: Fix issue with sed not being able to handle some + characters + * slapt-src: split options from their arguments + * psql: Tell psql to not load .psqlrc as it may change output format + (Alioth: #314636) + * mplayer: -dvd-devices takes dvd devices, dirs and .iso files as + argument + * 7z: Improve completion + * f77, f95: Use the same completion as for g77, g95 if they are + links to gfortran + * make: Use only posix basic regexps with sed (Alioth: #314345) + * perl: -d/-dt option argument is optional (Alioth: #314242) + * Add config for cmake to bash-completion. + * kcov: Add new sort types, complete --replace-src-path arguments + * feh: Add new sort type + * man: Use -w instead of --path + * chronyc: Update help text parsing + * chronyc: Add missing subcommands + * chronyc: Add -6 option + * minicom: Recognize user ~/.minirc.* as config files + * rpmbuild: Complete *.spec on --clean (RedHat: #1132959) + * tar: rework the completion completely + * portsnap: New completion. + * modprobe: fix params with multi-line descriptions + * gdb: support --args style completion (Alioth: #314664) + * make: Fix basic regex for portability (Alioth: #314345) + * gnokii: New completion + * xmllint, xmlwf, xsltproc: Complete on Mallard *.page files + * pypy: New completion identical to python (Alioth: #314501) + * make: Don't pick up variables when makefile is reloaded + * make: Offer hidden targets when it is clear that the user is + trying to complete one of them + * make: Fix detection of intermediate targets where make has changed + its database whitespace + * make: completion shouldn't be confused by the output of $(info + confuse: make) + * zopflipng: New completion + * ssh: Extract duplicate code to _ssh_configfile + * gnokii, minicom: Use grep through "command" + * Update URLs and various instructions to GitHub + * ssh: Avoid completing commands before hostname + * chronyc: Parse command args from help output + * chronyc: Wrap long lines + * Load completions also from $XDG_DATA_DIRS (RedHat: #1264094) + * (testsuite) Ignore files generated by complete-ant-cmd.pl + * scp, sftp: Complete -S on commands + * scp, sftp: Fix querying ssh options + * sftp: Add -l arg non-completion + * ssh-copy-id: Offer only *.pub to -i + * mpv: Remove mplayer-aliased completion + * modplug*: Associate *.oct and *.okt + * rpm: Add --whatenhances/recommends/suggests/supplements and + --recommends/supplements completions + * pgrep, pidof, pkill, pwdx, vmstat: Add support for procps-ng + * pdftotext: New completion + * checksec: New completion + * ssh: Complete HostbasedKeyTypes,HostKeyAlgorithms,KexAlgorithms + values + * ssh: Query ciphers and macs from ssh before hardcoded fallback + * ssh: Add -Q argument completion + * sysctl: Return early on --help, --version + * sysctl: Try parsing options from help before usage + * eog: Complete on *.ppm (RedHat: #1090481) + * tar: Plug $line var leak + * tar: Style tweaks + * bsdtar, tar: Remove symlinks from git, have make create them + * jshint: New completion + * gnokii: Include and install it + * gnokii: Fix completions of options that are prefixes for others + * gnokii: Drop dead code + * (testsuite): Add basic gnokii test case + * gnokii: Various minor and cosmetic fixes + * Load user completions from $BASH_COMPLETION_USER_DIR/completions + * synclient: New completion + * tune2fs: Add missing return in -M arg completion + * reptyr: Rename file to _reptyr to avoid conflict with upstreamed + completion + * dropuser: New completion + * createuser: New completion + * createdb, dropdb: Drop -o default, it does not appear to do + anything good here + * tshark: Simplify cut usage + * mcrypt: Simplify -m arg completion + * strings: Fix -T/--target arg completion with non-English locale + * chrome, firefox etc: Complete on *.pdf + * ccache: Add -o/--set-config arg name completion + * gphoto2: Replace tail with awk + * gphoto2: Fix split argument handing, and colon treatment in --port + args + * Actually install the lz4 completion + * _pnames: Add -s for producing (possibly) truncated names (RedHat: + #744406) + * (testsuite) Add cd in dir without subdirs or CDPATH test case + * Protect various compgen invocations from -* leakage (Debian: + #766163) + * pigz, unpigz: Handle *.zz + * rpmbuild: Complete *.spec on --nobuild + * mplayer, *xine: Complete on *.mts (Debian: #759219) + * ant: Support buildfile set in $ANT_ARGS (Alioth: #314735) + * ant: Don't offer more completions after options that exit + * 7z, adb: Trivial cleanups + * python(3): Add -X argument non-completion + * xsltproc. TODO fix for previous commit + * xmllint, xmlwf, xsltproc: Complete on *.dbk and *.docbook (Alioth: + #314770) + * xz: Complete -T/--threads argument + * adb: New completion + * modprobe: Try parsing help before using hardcoding option list + * mpv: New completion alias + adjustments for mplayer (Debian: + #749115) + * hostname: New completion + * nslookup: complete on hosts (Alioth: #314673) + * eog: Complete on *.pgm (RedHat: #1090481) + * pngfix: New completion + * qemu: Fix -balloon arg completion + * qemu: Apply completion to qemu-kvm/-system-i386/-system-x86_64 too + * xrandr: Use the invoked command internally, not hardcoded "xrandr" + * xrandr: Add (some) --setprovider* arg completion support + * ri: Fix class completion with ri >= 3. + * ri: Fix colon handling in class completion. + * flake8: New completion + * pyflakes: New completion + * cal,chfn,chsh,dmesg,eject,hexdump,look,newgrp,renice,runuser,su,wr + ite: Deprecate on Linux in favor of util-linux ones (Debian: + #737672) + * hwclock,ionice,rtcwake: Deprecate in favor of util-linux ones + (Debian: #737672) + * ssh-keygen: New completion + * jpegoptim: New completion + * ip: Add some addr, addrlabel, and route arg completions + * aptitude, dpkg: Replace some grep+cuts with awk + * gcc, lintian, make, pkgadd, slackpkg: grep -> "command grep" + (Debian: #734095) + * lintian: Replace some grep+cuts with awk + * lz4: New completion. + * optipng: New completion. + * cppcheck: Include - in --file-list completions. + * wtf: Look for acronym db from /usr/share/games/bsdgames/acronyms + too. + * wtf: Don't offer -f if it was already specified. + * wtf: Hush stderr when db file doesn't exist. + * appdata-validate: New completion. + * timeout: New completion. + * abook, kldunload: Pre-expand \t instead of relying on sed + supporting it. + * dict: Trivial regex cleanup. + * zopfli: New completion. + * bzip2, gzip, lzma: Cleanups. + * 2to3: New completion. + * file-roller: Reuse unzip's xspec. + * 7z: New completion. + * hcitool, rfcomm, ciptool, hciconfig: Don't leak $args. + * perl: Fix -dt: completion. + * perl*: Fix handling of relative paths in @INC. + * wget: Add --accept-regex/--reject-regex/--regex-type arg + (non)completions. + * wget: Drop incorrect -nv arg completion. + * wget: Stop completing after --help/--version. + * Clean up/compact various globs. + * cvs: Fix checkout -j non-completion. + * sh: Complete script arguments with all filenames (Alioth: + #314226). + * nmcli: Deprecate our completion, upstream has one in 0.9.8.0. + * cvs rm: Don't filter existing files with -f (RedHat: #949479). +- Drop patches now upstream + init-completion-boo922758.patch + pushd-completion-bnc818365.patch +- Rename patches + bash-completion-2.1.patch becomes bash-completion-2.4.patch +- Port the patches to newer version 2.4 + FOO-dir-completion-boo905348.patch + LVM-completion-bsc946875.patch + PS1-completion-boo903362.patch + backtick-completion-boo940835.patch + backticks-bsc963140.patch + ls-completion-boo889319.patch + respect-variables-boo940837.patch + rm-completion-smart-boo958462.patch + sh-script-completion-boo977336.patch +- Only remove completion for umount/mount for older SUSE versions (boo#995045) + ------------------------------------------------------------------- Wed Aug 24 06:58:32 UTC 2016 - tchvatal@suse.com diff --git a/bash-completion-doc.spec b/bash-completion-doc.spec index 320cb75..6868c7b 100644 --- a/bash-completion-doc.spec +++ b/bash-completion-doc.spec @@ -20,24 +20,20 @@ Name: bash-completion-doc %define _name bash-completion # WARNING: Never edit this file!!! Edit bash-completion.spec and call pre_checkin.sh to update bash-completion-doc.spec. # Always set %%build_doc to 0 before submit to OBS. -Version: 2.1 +Version: 2.4 Release: 0 Summary: The Documentation of Programmable Completion for Bash License: GPL-2.0+ Group: Development/Libraries/C and C++ -Url: http://bash-completion.alioth.debian.org/ -Source0: http://bash-completion.alioth.debian.org/files/%{_name}-%{version}.tar.bz2 +Url: https://github.com/scop/bash-completion/ +Source0: https://github.com/scop/bash-completion/releases/download/%{version}/%{_name}-%{version}.tar.xz Source1: bash-completion-rpmlintrc # PATCH-FIX-UPSTREAM bnc#717151 -- Terminal tab autocompletion error Patch0: %{_name}-%{version}.patch -# PATCH-PATCH-EXTEND-OPENSUSE bnc#818365 -- bash completion for builtin command "pushd" is missing -Patch1: pushd-completion-bnc818365.patch # PATCH-FIX-SUSE bnc#903362 -- tab completion for file names prints error Patch2: PS1-completion-boo903362.patch # PATCH-FIX-SUSE boo#905348 -- tab completion with shell variable changes command line with backslash Patch3: FOO-dir-completion-boo905348.patch -# PATCH-FIX-SUSE boo#922758 -- avoid negative cword position counter -Patch4: init-completion-boo922758.patch # PATCH-FIX-SUSE boo#889319 Patch5: ls-completion-boo889319.patch # PATCH-FIX-SUSE boo#940835 @@ -65,10 +61,8 @@ package bash-completion. %prep %setup -q -n %{_name}-%{version} %patch0 -b .p0 -%patch1 -b .p1 %patch2 -b .p2 %patch3 -b .p3 -%patch4 -b .p4 %patch5 -b .p5 %patch6 -b .p6 %patch7 -b .p7 -p1 @@ -90,7 +84,7 @@ pushd doc install -m 0644 html/* %{buildroot}%{_defaultdocdir}/%{_name}/html/ popd install -m 0644 AUTHORS %{buildroot}%{_defaultdocdir}/%{_name}/ -install -m 0644 README %{buildroot}%{_defaultdocdir}/%{_name}/ +install -m 0644 README.md %{buildroot}%{_defaultdocdir}/%{_name}/README %files %defattr(-,root,root) diff --git a/bash-completion.changes b/bash-completion.changes index 9e336ad..72417ee 100644 --- a/bash-completion.changes +++ b/bash-completion.changes @@ -1,3 +1,237 @@ +------------------------------------------------------------------- +Wed Dec 14 10:46:27 UTC 2016 - werner@suse.de + +- Change upstream home to https://github.com/scop/bash-completion +- Update do verion 2.4 + * xetex, xelatex, luatex, lualatex: Associate with tex files + * Support pod document files for perldoc (#39) + * tipc: add tipc completions + * rpm: Offer --filetriggers with -q + * javadoc: Add bunch of option arg (non)completions + * lrzip: Add -m arg noncompletion + * pypy*: Add basic --jit arg completion + * pypy3: Alias to python + * hcitool,svcadm,tar: Spelling fixes + * tipc: Invoke ls with "command" + * tipc: Indentation fix + * abook: Parse long options from command including full path + * pyvenv: New completion + * chroot: New (generic long options) completion, see #38 + * aptitude: List packages using _apt_cache_packages, fixes #33 + * vncviewer: Cleanup shopt use, drop an eval + * make: Avoid a grep + * rpm: Fix --whatenhances arg completion + * aspell, minicom, mysql: Replace use of ls with printf + * The BitKeeper completion used the wrong set of commands + * Completion for python zip archives + * lvm: pvcreate should be able to use all block devcices + * lvm: fix all commands that should get all PVs + * tar: Detect GNU/other from --version only once per session + * tar: Remove unused variable + * tar: Fix GNU tar help output parsing regex, fixes #15 + * tar: Don't write to /tmp/jetel + * python: Simplify code + * python: Complete all files also after -m + * python: Don't offer options after -c + * python: Complete all files only if -c is before current word + * unzip, zipinfo: Complete on *.pyz + * _lvm: using a single-pattern case and invoking function according + to words[1] + * lvm: _lvm_count_args parameter must be quoted in order to failglob + not to complain + * gendiff: Quoting suffix pattern to avoid triggering failglob + * ssh-add, ssh-keygen: -? needs to be quoted under failglob (Alioth: + #314709) + * Refactor bts and uscan, since they use common functions + * uscan: New completion, thanks to Federico Ceratto + * bts: New completion, thanks to Federico Ceratto. + * nmcli completion was integrated upstream + * ssh-add, ssh-keygen: -? needs to be quoted under failglob (take 2) + (Alioth: #314709) + * umount: Fix mount points escaping/unescaping with Bash-4.3 + * slapt-src: Handle --config=FILE option properly + * sbopkg, slapt-{get,src}: expand tilde in config file name + * slapt-{get,src}: Fix issue with sed not being able to handle some + characters + * slapt-src: split options from their arguments + * psql: Tell psql to not load .psqlrc as it may change output format + (Alioth: #314636) + * mplayer: -dvd-devices takes dvd devices, dirs and .iso files as + argument + * 7z: Improve completion + * f77, f95: Use the same completion as for g77, g95 if they are + links to gfortran + * make: Use only posix basic regexps with sed (Alioth: #314345) + * perl: -d/-dt option argument is optional (Alioth: #314242) + * Add config for cmake to bash-completion. + * kcov: Add new sort types, complete --replace-src-path arguments + * feh: Add new sort type + * man: Use -w instead of --path + * chronyc: Update help text parsing + * chronyc: Add missing subcommands + * chronyc: Add -6 option + * minicom: Recognize user ~/.minirc.* as config files + * rpmbuild: Complete *.spec on --clean (RedHat: #1132959) + * tar: rework the completion completely + * portsnap: New completion. + * modprobe: fix params with multi-line descriptions + * gdb: support --args style completion (Alioth: #314664) + * make: Fix basic regex for portability (Alioth: #314345) + * gnokii: New completion + * xmllint, xmlwf, xsltproc: Complete on Mallard *.page files + * pypy: New completion identical to python (Alioth: #314501) + * make: Don't pick up variables when makefile is reloaded + * make: Offer hidden targets when it is clear that the user is + trying to complete one of them + * make: Fix detection of intermediate targets where make has changed + its database whitespace + * make: completion shouldn't be confused by the output of $(info + confuse: make) + * zopflipng: New completion + * ssh: Extract duplicate code to _ssh_configfile + * gnokii, minicom: Use grep through "command" + * Update URLs and various instructions to GitHub + * ssh: Avoid completing commands before hostname + * chronyc: Parse command args from help output + * chronyc: Wrap long lines + * Load completions also from $XDG_DATA_DIRS (RedHat: #1264094) + * (testsuite) Ignore files generated by complete-ant-cmd.pl + * scp, sftp: Complete -S on commands + * scp, sftp: Fix querying ssh options + * sftp: Add -l arg non-completion + * ssh-copy-id: Offer only *.pub to -i + * mpv: Remove mplayer-aliased completion + * modplug*: Associate *.oct and *.okt + * rpm: Add --whatenhances/recommends/suggests/supplements and + --recommends/supplements completions + * pgrep, pidof, pkill, pwdx, vmstat: Add support for procps-ng + * pdftotext: New completion + * checksec: New completion + * ssh: Complete HostbasedKeyTypes,HostKeyAlgorithms,KexAlgorithms + values + * ssh: Query ciphers and macs from ssh before hardcoded fallback + * ssh: Add -Q argument completion + * sysctl: Return early on --help, --version + * sysctl: Try parsing options from help before usage + * eog: Complete on *.ppm (RedHat: #1090481) + * tar: Plug $line var leak + * tar: Style tweaks + * bsdtar, tar: Remove symlinks from git, have make create them + * jshint: New completion + * gnokii: Include and install it + * gnokii: Fix completions of options that are prefixes for others + * gnokii: Drop dead code + * (testsuite): Add basic gnokii test case + * gnokii: Various minor and cosmetic fixes + * Load user completions from $BASH_COMPLETION_USER_DIR/completions + * synclient: New completion + * tune2fs: Add missing return in -M arg completion + * reptyr: Rename file to _reptyr to avoid conflict with upstreamed + completion + * dropuser: New completion + * createuser: New completion + * createdb, dropdb: Drop -o default, it does not appear to do + anything good here + * tshark: Simplify cut usage + * mcrypt: Simplify -m arg completion + * strings: Fix -T/--target arg completion with non-English locale + * chrome, firefox etc: Complete on *.pdf + * ccache: Add -o/--set-config arg name completion + * gphoto2: Replace tail with awk + * gphoto2: Fix split argument handing, and colon treatment in --port + args + * Actually install the lz4 completion + * _pnames: Add -s for producing (possibly) truncated names (RedHat: + #744406) + * (testsuite) Add cd in dir without subdirs or CDPATH test case + * Protect various compgen invocations from -* leakage (Debian: + #766163) + * pigz, unpigz: Handle *.zz + * rpmbuild: Complete *.spec on --nobuild + * mplayer, *xine: Complete on *.mts (Debian: #759219) + * ant: Support buildfile set in $ANT_ARGS (Alioth: #314735) + * ant: Don't offer more completions after options that exit + * 7z, adb: Trivial cleanups + * python(3): Add -X argument non-completion + * xsltproc. TODO fix for previous commit + * xmllint, xmlwf, xsltproc: Complete on *.dbk and *.docbook (Alioth: + #314770) + * xz: Complete -T/--threads argument + * adb: New completion + * modprobe: Try parsing help before using hardcoding option list + * mpv: New completion alias + adjustments for mplayer (Debian: + #749115) + * hostname: New completion + * nslookup: complete on hosts (Alioth: #314673) + * eog: Complete on *.pgm (RedHat: #1090481) + * pngfix: New completion + * qemu: Fix -balloon arg completion + * qemu: Apply completion to qemu-kvm/-system-i386/-system-x86_64 too + * xrandr: Use the invoked command internally, not hardcoded "xrandr" + * xrandr: Add (some) --setprovider* arg completion support + * ri: Fix class completion with ri >= 3. + * ri: Fix colon handling in class completion. + * flake8: New completion + * pyflakes: New completion + * cal,chfn,chsh,dmesg,eject,hexdump,look,newgrp,renice,runuser,su,wr + ite: Deprecate on Linux in favor of util-linux ones (Debian: + #737672) + * hwclock,ionice,rtcwake: Deprecate in favor of util-linux ones + (Debian: #737672) + * ssh-keygen: New completion + * jpegoptim: New completion + * ip: Add some addr, addrlabel, and route arg completions + * aptitude, dpkg: Replace some grep+cuts with awk + * gcc, lintian, make, pkgadd, slackpkg: grep -> "command grep" + (Debian: #734095) + * lintian: Replace some grep+cuts with awk + * lz4: New completion. + * optipng: New completion. + * cppcheck: Include - in --file-list completions. + * wtf: Look for acronym db from /usr/share/games/bsdgames/acronyms + too. + * wtf: Don't offer -f if it was already specified. + * wtf: Hush stderr when db file doesn't exist. + * appdata-validate: New completion. + * timeout: New completion. + * abook, kldunload: Pre-expand \t instead of relying on sed + supporting it. + * dict: Trivial regex cleanup. + * zopfli: New completion. + * bzip2, gzip, lzma: Cleanups. + * 2to3: New completion. + * file-roller: Reuse unzip's xspec. + * 7z: New completion. + * hcitool, rfcomm, ciptool, hciconfig: Don't leak $args. + * perl: Fix -dt: completion. + * perl*: Fix handling of relative paths in @INC. + * wget: Add --accept-regex/--reject-regex/--regex-type arg + (non)completions. + * wget: Drop incorrect -nv arg completion. + * wget: Stop completing after --help/--version. + * Clean up/compact various globs. + * cvs: Fix checkout -j non-completion. + * sh: Complete script arguments with all filenames (Alioth: + #314226). + * nmcli: Deprecate our completion, upstream has one in 0.9.8.0. + * cvs rm: Don't filter existing files with -f (RedHat: #949479). +- Drop patches now upstream + init-completion-boo922758.patch + pushd-completion-bnc818365.patch +- Rename patches + bash-completion-2.1.patch becomes bash-completion-2.4.patch +- Port the patches to newer version 2.4 + FOO-dir-completion-boo905348.patch + LVM-completion-bsc946875.patch + PS1-completion-boo903362.patch + backtick-completion-boo940835.patch + backticks-bsc963140.patch + ls-completion-boo889319.patch + respect-variables-boo940837.patch + rm-completion-smart-boo958462.patch + sh-script-completion-boo977336.patch +- Only remove completion for umount/mount for older SUSE versions (boo#995045) + ------------------------------------------------------------------- Wed Aug 24 06:58:32 UTC 2016 - tchvatal@suse.com diff --git a/bash-completion.spec b/bash-completion.spec index 4961336..a599655 100644 --- a/bash-completion.spec +++ b/bash-completion.spec @@ -22,24 +22,20 @@ Name: bash-completion %define build_core 1 # Always set %%build_doc to 0 before submit to OBS. %define build_doc 0 -Version: 2.1 +Version: 2.4 Release: 0 Summary: Programmable Completion for Bash License: GPL-2.0+ Group: System/Shells -Url: http://bash-completion.alioth.debian.org/ -Source0: http://bash-completion.alioth.debian.org/files/%{name}-%{version}.tar.bz2 +Url: https://github.com/scop/bash-completion/ +Source0: https://github.com/scop/bash-completion/releases/download/%{version}/%{name}-%{version}.tar.xz Source1: bash-completion-rpmlintrc # PATCH-FIX-UPSTREAM bnc#717151 -- Terminal tab autocompletion error Patch0: %{name}-%{version}.patch -# PATCH-PATCH-EXTEND-OPENSUSE bnc#818365 -- bash completion for builtin command "pushd" is missing -Patch1: pushd-completion-bnc818365.patch # PATCH-FIX-SUSE bnc#903362 -- tab completion for file names prints error Patch2: PS1-completion-boo903362.patch # PATCH-FIX-SUSE boo#905348 -- tab completion with shell variable changes command line with backslash Patch3: FOO-dir-completion-boo905348.patch -# PATCH-FIX-SUSE boo#922758 -- avoid negative cword position counter -Patch4: init-completion-boo922758.patch # PATCH-FIX-SUSE boo#889319 Patch5: ls-completion-boo889319.patch # PATCH-FIX-SUSE boo#940835 @@ -60,6 +56,7 @@ BuildRequires: libxslt-tools %endif %build_doc BuildRequires: pkg-config %if %build_core +BuildRequires: cmake Requires: bash %endif BuildRoot: %{_tmppath}/%{name}-%{version}-build @@ -95,10 +92,8 @@ package bash-completion. %prep %setup -q %patch0 -b .p0 -%patch1 -b .p1 %patch2 -b .p2 %patch3 -b .p3 -%patch4 -b .p4 %patch5 -b .p5 %patch6 -b .p6 %patch7 -b .p7 -p1 @@ -134,12 +129,16 @@ rm -vf %{buildroot}%{_datadir}/bash-completion/completions/hexdump rm -vf %{buildroot}%{_datadir}/bash-completion/completions/hwclock rm -vf %{buildroot}%{_datadir}/bash-completion/completions/ionice rm -vf %{buildroot}%{_datadir}/bash-completion/completions/look +%if 0%{?suse_version} <= 1320 rm -vf %{buildroot}%{_datadir}/bash-completion/completions/mount +%endif rm -vf %{buildroot}%{_datadir}/bash-completion/completions/newgrp rm -vf %{buildroot}%{_datadir}/bash-completion/completions/renice rm -vf %{buildroot}%{_datadir}/bash-completion/completions/rtcwake rm -vf %{buildroot}%{_datadir}/bash-completion/completions/su +%if 0%{?suse_version} <= 1320 rm -vf %{buildroot}%{_datadir}/bash-completion/completions/umount +%endif %endif %build_core %if %build_doc pushd doc @@ -147,7 +146,7 @@ pushd doc install -m 0644 html/* %{buildroot}%{_defaultdocdir}/%{name}/html/ popd install -m 0644 AUTHORS %{buildroot}%{_defaultdocdir}/%{name}/ -install -m 0644 README %{buildroot}%{_defaultdocdir}/%{name}/ +install -m 0644 README.md %{buildroot}%{_defaultdocdir}/%{name}/README %endif %build_doc %if %build_core @@ -160,6 +159,7 @@ install -m 0644 README %{buildroot}%{_defaultdocdir}/%{name}/ %exclude %{_defaultdocdir}/%{name}/html/ %endif %build_doc %{_datadir}/bash-completion +%{_datadir}/cmake/bash-completion %config %{_sysconfdir}/profile.d/bash_completion.sh %files devel diff --git a/init-completion-boo922758.patch b/init-completion-boo922758.patch deleted file mode 100644 index e1c6b51..0000000 --- a/init-completion-boo922758.patch +++ /dev/null @@ -1,15 +0,0 @@ ---- - bash_completion | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - ---- bash_completion -+++ bash_completion 2015-03-18 12:47:45.114019106 +0000 -@@ -708,7 +708,7 @@ _init_completion() - fi - done - -- [[ $cword -eq 0 ]] && return 1 -+ [[ $cword -le 0 ]] && return 1 - prev=${words[cword-1]} - - [[ ${split-} ]] && _split_longopt && split=true diff --git a/ls-completion-boo889319.patch b/ls-completion-boo889319.patch index 3323602..3a3bf15 100644 --- a/ls-completion-boo889319.patch +++ b/ls-completion-boo889319.patch @@ -1,29 +1,20 @@ --- - bash_completion | 10 ++++++++-- - 1 file changed, 8 insertions(+), 2 deletions(-) + bash_completion | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) --- bash_completion -+++ bash_completion 2015-06-15 08:24:25.093518526 +0000 -@@ -1838,14 +1838,20 @@ _longopt() - fi - } ++++ bash_completion 2016-12-14 09:29:59.066258452 +0000 +@@ -1896,11 +1896,12 @@ _longopt() # makeinfo and texi2dvi are defined elsewhere. --complete -F _longopt -o filenames a2ps awk base64 bash bc bison cat colordiff cp csplit \ -+complete -F _longopt -o filenames a2ps awk base64 bash bc bison cat colordiff cp csplit \ - cut date df diff dir du enscript expand fmt fold gperf \ -- grep grub head indent irb ld ldd less ln ls m4 md5sum mkdir mkfifo mknod \ -+ grep grub head indent irb ld ldd less ln m4 md5sum mkdir mkfifo mknod \ + complete -F _longopt -o filenames a2ps awk base64 bash bc bison cat chroot colordiff cp \ + csplit cut date df diff dir du enscript expand fmt fold gperf \ +- grep grub head irb ld ldd less ln ls m4 md5sum mkdir mkfifo mknod \ ++ grep grub head irb ld ldd less ln m4 md5sum mkdir mkfifo mknod \ mv nl nm objcopy objdump od paste pr ptx readelf rm rmdir \ sed sha{,1,224,256,384,512}sum shar sort split strip sum tac tail tee \ texindex touch tr unexpand uniq vdir wc who complete -F _longopt -o default env netstat seq uname units ++complete -o bashdefault -o default -o filenames -o nospace -F _ls_ ls ll la l ls-l lf -+if typeset -F _ls_ &> /dev/null; then -+ complete -o bashdefault -o default -o filenames -o nospace -F _ls_ ls ll la l ls-l lf -+else -+ complete -o bashdefault -o default -o filenames -o nospace -F _longopt ls ll la l ls-l lf -+fi -+ declare -A _xspecs _filedir_xspec() - { diff --git a/pushd-completion-bnc818365.patch b/pushd-completion-bnc818365.patch deleted file mode 100644 index 0566610..0000000 --- a/pushd-completion-bnc818365.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- bash_completion -+++ bash_completion 2013-05-13 06:58:59.717922133 +0000 -@@ -1620,6 +1620,8 @@ if shopt -q cdable_vars; then - else - complete -F _cd -o nospace cd - fi -+complete -F _cd -o nospace rmdir pushd chroot -+complete -F _cd -o nospace -o dirnames mkdir - - # a wrapper method for the next one, when the offset is unknown - _command() diff --git a/respect-variables-boo940837.patch b/respect-variables-boo940837.patch index f586306..8a080ee 100644 --- a/respect-variables-boo940837.patch +++ b/respect-variables-boo940837.patch @@ -9,8 +9,8 @@ commands like `ls' to go further in its completion chain. 1 file changed, 13 insertions(+), 2 deletions(-) --- bash_completion -+++ bash_completion 2015-12-18 09:53:36.647442000 +0100 -@@ -1798,8 +1798,19 @@ _complete_as_root() ++++ bash_completion 2016-12-14 10:22:02.200138796 +0000 +@@ -1854,8 +1854,19 @@ _complete_as_root() _longopt() { diff --git a/rm-completion-smart-boo958462.patch b/rm-completion-smart-boo958462.patch index 9c6a8a5..dbcb3f3 100644 --- a/rm-completion-smart-boo958462.patch +++ b/rm-completion-smart-boo958462.patch @@ -4,21 +4,23 @@ Allow the smart bash builtin completion if normal completion scripting does not return anything. --- - bash_completion | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) + bash_completion | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) --- bash_completion -+++ bash_completion 2015-12-18 09:17:57.865910263 +0000 -@@ -1857,10 +1857,11 @@ _longopt() - complete -F _longopt -o filenames a2ps awk base64 bash bc bison cat colordiff cp csplit \ - cut date df diff dir du enscript expand fmt fold gperf \ - grep grub head indent irb ld ldd less ln m4 md5sum mkdir mkfifo mknod \ ++++ bash_completion 2016-12-14 10:27:19.377816132 +0000 +@@ -1913,11 +1913,13 @@ _longopt() + complete -F _longopt -o filenames a2ps awk base64 bash bc bison cat chroot colordiff cp \ + csplit cut date df diff dir du enscript expand fmt fold gperf \ + grep grub head irb ld ldd less ln m4 md5sum mkdir mkfifo mknod \ - mv nl nm objcopy objdump od paste pr ptx readelf rm rmdir \ + mv nl nm objcopy objdump od paste pr ptx readelf \ sed sha{,1,224,256,384,512}sum shar sort split strip sum tac tail tee \ texindex touch tr unexpand uniq vdir wc who complete -F _longopt -o default env netstat seq uname units + complete -o bashdefault -o default -o filenames -o nospace -F _ls_ ls ll la l ls-l lf +complete -F _longopt -o bashdefault -o default -o filenames -o nospace rm rmdir ++ - if typeset -F _ls_ &> /dev/null; then - complete -o bashdefault -o default -o filenames -o nospace -F _ls_ ls ll la l ls-l lf + declare -A _xspecs + _filedir_xspec() diff --git a/sh-script-completion-boo977336.patch b/sh-script-completion-boo977336.patch index aff41e8..553ec6c 100644 --- a/sh-script-completion-boo977336.patch +++ b/sh-script-completion-boo977336.patch @@ -2,65 +2,32 @@ This allows to use COMP_FILEDIR_FALLBACK=yes even if local sub directories exists (boo#977336) --- - bash_completion | 35 ++++++++++++++++++----------------- - 1 file changed, 18 insertions(+), 17 deletions(-) + bash_completion | 10 +++++----- + 1 file changed, 5 insertions(+), 5 deletions(-) --- bash_completion -+++ bash_completion 2016-04-27 12:00:15.278198877 +0000 -@@ -558,38 +558,39 @@ _quote_readline_by_ref() - # - _filedir() - { -- local IFS=$'\n' xspec -+ local IFS=$'\n' - - _tilde "$cur" || return 0 - _dollar "$cur" || return 0 - ++++ bash_completion 2016-12-14 10:44:34.717186388 +0000 +@@ -564,11 +564,6 @@ _filedir() local -a toks -- local quoted x tmp -- -- _quote_readline_by_ref "$cur" quoted + local x tmp + - x=$( compgen -d -- "$cur" ) && - while read -r tmp; do - toks+=( "$tmp" ) - done <<< "$x" -+ local x tmp - +- if [[ "$1" != -d ]]; then -+ local quoted -+ _quote_readline_by_ref "$cur" quoted -+ - # Munge xspec to contain uppercase version too - # http://thread.gmane.org/gmane.comp.shells.bash.bugs/15294/focus=15306 -- xspec=${1:+"!*.@($1|${1^^})"} -+ local xspec=${1:+"!*.@($1|${1^^})"} - x=$( compgen -f -X "$xspec" -- $quoted ) && - while read -r tmp; do - toks+=( "$tmp" ) - done <<< "$x" -- fi - -- # If the filter failed to produce anything, try without it if configured to -- [[ -n ${COMP_FILEDIR_FALLBACK:-} && \ -- -n "$1" && "$1" != -d && ${#toks[@]} -lt 1 ]] && \ -- x=$( compgen -f -- $quoted ) && -- while read -r tmp; do -- toks+=( "$tmp" ) -- done <<< "$x" -+ # If the filter failed to produce anything, try without it if configured to -+ [[ -n ${COMP_FILEDIR_FALLBACK:-} && \ -+ -n "$1" && "$1" != -d && ${#toks[@]} -lt 1 ]] && \ -+ x=$( compgen -f -- $quoted ) && -+ while read -r tmp; do -+ toks+=( "$tmp" ) -+ done <<< "$x" -+ fi + local quoted + _quote_readline_by_ref "$cur" quoted +@@ -589,6 +584,11 @@ _filedir() + done <<< "$x" + fi + x=$( compgen -d -- "$cur" ) && + while read -r tmp; do + toks+=( "$tmp" ) + done <<< "$x" - ++ if [[ ${#toks[@]} -ne 0 ]]; then # 2>/dev/null for direct invocation, e.g. in the _filedir unit test + compopt -o filenames 2>/dev/null