diff --git a/backticks-bsc963140.patch b/backticks-bsc963140.patch new file mode 100644 index 0000000..4702721 --- /dev/null +++ b/backticks-bsc963140.patch @@ -0,0 +1,43 @@ +--- + bash-completion-2.1/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() + [[ "$COMP_LINE" == cd* ]] && s="/" + + case "$1" in ++ \$\(*\)) ++ ((glob == 0)) && shopt -u extglob ++ return 0 ++ ;; + \$\(*) +- COMPREPLY=($(compgen -c -P '$(' -S ")$s" -- ${1#??})) +- let cmd++ ++ COMPREPLY=($(compgen -c -P '$(' -S ")$s" -- ${1:2})) ++ ((${#COMPREPLY[@]} <= 0)) && let cmd++ ++ ;; ++ \`*\`) ++ ((glob == 0)) && shopt -u extglob ++ return 0 + ;; + \`*) +- COMPREPLY=($(compgen -c -P '\`' -S "\`$s" -- ${1#?})) +- let cmd++ ++ COMPREPLY=($(compgen -c -P '\`' -S "\`$s" -- ${1:1})) ++ ((${#COMPREPLY[@]} <= 0)) && let cmd++ + ;; + \$\{*) + COMPREPLY=($(compgen -v -P '${' -S "}$s" -- ${1#??})) ;; +@@ -971,8 +979,8 @@ _dollar() + + if ((${#COMPREPLY[@]} > 0)) ; then + ((${#COMPREPLY[@]} == 1)) && eval COMPREPLY=\(${COMPREPLY[@]}\) +- elif ((cmd == 0)); then +- eval COMPREPLY=\(${1}\) ++ elif ((cmd > 0)); then ++ compopt -o default -o bashdefault -o nospace + fi + + ((glob == 0)) && shopt -u extglob diff --git a/bash-completion.changes b/bash-completion.changes index 37ebf04..ee33bc1 100644 --- a/bash-completion.changes +++ b/bash-completion.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Wed Jan 27 15:42:34 UTC 2016 - werner@suse.de + +- Add patch backticks-bsc963140.patch to handle sub commands + which will be expanded by backticks (bsc#963140) + ------------------------------------------------------------------- Fri Dec 18 09:33:05 UTC 2015 - werner@suse.de diff --git a/bash-completion.spec b/bash-completion.spec index b0b994b..f4c34af 100644 --- a/bash-completion.spec +++ b/bash-completion.spec @@ -1,7 +1,7 @@ # # spec file for package bash-completion # -# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -45,6 +45,8 @@ Patch7: LVM-completion-bsc946875.patch Patch8: respect-variables-boo940837.patch # PATCH-FIX-SUSE boo#958462 Patch9: rm-completion-smart-boo958462.patch +# PATCH-FIX-SUSE boo#963140 +Patch10: backticks-bsc963140.patch BuildRequires: pkg-config Requires: bash BuildRoot: %{_tmppath}/%{name}-%{version}-build @@ -66,6 +68,7 @@ of the programmable completion feature of Bash 2.04 and later. %patch7 -b .p7 -p1 %patch8 -b .p8 %patch9 -b .p9 +%patch10 -b .p10 -p1 %build %configure