boo#977336
OBS-URL: https://build.opensuse.org/package/show/shells/bash-completion?expand=0&rev=68
This commit is contained in:
parent
4e55c7c450
commit
a4bd526705
@ -1,3 +1,10 @@
|
||||
-------------------------------------------------------------------
|
||||
Wed Apr 27 12:42:50 UTC 2016 - werner@suse.de
|
||||
|
||||
- Add patch sh-script-completion-boo977336.patch to make _filedir
|
||||
work with COMP_FILEDIR_FALLBACK even if local directries exists
|
||||
this is for bug boo##977336
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Apr 27 11:54:07 UTC 2016 - werner@suse.de
|
||||
|
||||
|
@ -47,6 +47,8 @@ Patch8: respect-variables-boo940837.patch
|
||||
Patch9: rm-completion-smart-boo958462.patch
|
||||
# PATCH-FIX-SUSE boo#963140
|
||||
Patch10: backticks-bsc963140.patch
|
||||
# PATCH-FIX-SUSE boo#977336
|
||||
Patch11: sh-script-completion-boo977336.patch
|
||||
BuildRequires: asciidoc
|
||||
BuildRequires: libxslt-tools
|
||||
BuildRequires: pkg-config
|
||||
@ -71,6 +73,7 @@ of the programmable completion feature of Bash 2.04 and later.
|
||||
%patch8 -b .p8
|
||||
%patch9 -b .p9
|
||||
%patch10 -b .p10 -p1
|
||||
%patch11 -b .p11 -p0
|
||||
|
||||
%build
|
||||
%configure
|
||||
|
66
sh-script-completion-boo977336.patch
Normal file
66
sh-script-completion-boo977336.patch
Normal file
@ -0,0 +1,66 @@
|
||||
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
|
||||
+++ 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
|
||||
|
||||
local -a toks
|
||||
- local quoted x tmp
|
||||
-
|
||||
- _quote_readline_by_ref "$cur" quoted
|
||||
- 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
|
||||
|
||||
+ 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
|
Loading…
x
Reference in New Issue
Block a user