Hello community,

here is the log from the commit of package bash-completion for openSUSE:Factory 
checked in at 2015-03-19 21:09:41
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/bash-completion (Old)
 and      /work/SRC/openSUSE:Factory/.bash-completion.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "bash-completion"

Changes:
--------
--- /work/SRC/openSUSE:Factory/bash-completion/bash-completion.changes  
2014-11-26 10:32:44.000000000 +0100
+++ /work/SRC/openSUSE:Factory/.bash-completion.new/bash-completion.changes     
2015-03-19 21:09:42.000000000 +0100
@@ -1,0 +2,8 @@
+Wed Mar 18 12:45:23 UTC 2015 - [email protected]
+
+- Port my dollar completion from /etc/profile.d/completion.bash to
+  bash_completion which modifies FOO-dir-completion-boo905348.patch
+- Avoid negative cword position counter (boo#922758), this adds
+  the patch init-completion-boo922758.patch
+
+-------------------------------------------------------------------

New:
----
  init-completion-boo922758.patch

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ bash-completion.spec ++++++
--- /var/tmp/diff_new_pack.ozprRh/_old  2015-03-19 21:09:43.000000000 +0100
+++ /var/tmp/diff_new_pack.ozprRh/_new  2015-03-19 21:09:43.000000000 +0100
@@ -1,7 +1,7 @@
 #
 # spec file for package bash-completion
 #
-# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany.
+# Copyright (c) 2015 SUSE LINUX Products GmbH, Nuernberg, Germany.
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -31,8 +31,10 @@
 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 bnc#905348 -- tab completion with shell variable changes 
command line with backslash
+# 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
 BuildRequires:  pkg-config
 Requires:       bash
 BuildRoot:      %{_tmppath}/%{name}-%{version}-build
@@ -48,6 +50,7 @@
 %patch1 -b .p1
 %patch2 -b .p2
 %patch3 -b .p3
+%patch4 -b .p4
 
 %build
 %configure

++++++ FOO-dir-completion-boo905348.patch ++++++
--- /var/tmp/diff_new_pack.ozprRh/_old  2015-03-19 21:09:43.000000000 +0100
+++ /var/tmp/diff_new_pack.ozprRh/_new  2015-03-19 21:09:43.000000000 +0100
@@ -1,21 +1,85 @@
 ---
- bash_completion |    8 ++++++++
- 1 file changed, 8 insertions(+)
+ bash_completion |   51 ++++++++++++++++++++++++++++++++++++++++++++++++---
+ 1 file changed, 48 insertions(+), 3 deletions(-)
 
 --- bash_completion
-+++ bash_completion    2014-11-17 12:41:17.573518527 +0000
-@@ -565,6 +565,14 @@ _filedir()
++++ 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
+ 
+     _tilde "$cur" || return 0
++    _dollar "$cur" || return 0
+ 
      local -a toks
      local quoted x tmp
  
-+    if [[ $cur =~ ^(\$\{?)([A-Za-z0-9_]*)/ ]]; then
-+        eval local dir="${cur%%/*}"
-+        if [[ -d "$dir" ]]; then
-+            cur="${dir}/${cur#*/}"
-+            [[ "$1" != -d ]] && set -- -d $@
-+        fi
-+    fi
-+
      _quote_readline_by_ref "$cur" quoted
-     x=$( compgen -d -- "$quoted" ) &&
+-    x=$( compgen -d -- "$quoted" ) &&
++    x=$( compgen -d -- "$cur" ) &&
      while read -r tmp; do
+         toks+=( "$tmp" )
+     done <<< "$x"
+@@ -937,6 +938,41 @@ _tilde()
+     return $result
+ }
+ 
++# Perform dollar ($) completion
++# @return  True (0) if completion needs further processing,
++#          False (> 0) if tilde is followed by a valid username, completions
++#          are put in COMPREPLY and no further processing is necessary.
++_dollar()
++{
++    local s=""
++    local -i glob=0
++
++    shopt -q extglob && let glob++
++    ((glob == 0)) && shopt -s extglob
++
++    [[ "$COMP_LINE" == cd* ]] && s="/"
++
++    case "$1" in
++    \$\(*|\`*)
++        COMPREPLY=($(compgen -c -P '$(' -S ")$s" -- ${1#??})) ;;
++    \$\{*)
++        COMPREPLY=($(compgen -v -P '${' -S "}$s" -- ${1#??})) ;;
++    \$*)
++        COMPREPLY=($(compgen -v -P '$' ${s:+-S $s} -- ${1#?})) ;;
++    *)
++        ((glob == 0)) && shopt -u extglob
++        return 0
++    esac
++
++    if ((${#COMPREPLY[@]} > 0)) ; then
++        ((${#COMPREPLY[@]} == 1)) && eval COMPREPLY=\(${COMPREPLY[@]}\)
++    else
++        eval COMPREPLY=\(${1}\)
++    fi
++
++    ((glob == 0)) && shopt -u extglob
++    return ${#COMPREPLY[@]}
++}
+ 
+ # 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
+ _cd()
+ {
+     local cur prev words cword
+-    _init_completion || return
++    _init_completion || {
++        if [[ ${#COMPREPLY[@]} -eq 1 ]]; then
++            local i=${COMPREPLY[0]}
++            if [[ "$i" == "$cur" && $i != "*/" ]]; then
++                _dollar "$i" || return
++                COMPREPLY[0]="${i%%/}/"
++            fi
++        fi
++        return
++    }
+ 
+     local IFS=$'\n' i j k
+ 

++++++ init-completion-boo922758.patch ++++++
---
 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
-- 
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to