Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package bash-completion for openSUSE:Factory 
checked in at 2023-08-18 19:27:06
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/bash-completion (Old)
 and      /work/SRC/openSUSE:Factory/.bash-completion.new.1766 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "bash-completion"

Fri Aug 18 19:27:06 2023 rev:57 rq:1104392 version:2.11

Changes:
--------
--- /work/SRC/openSUSE:Factory/bash-completion/bash-completion.changes  
2023-04-18 15:52:04.637138337 +0200
+++ 
/work/SRC/openSUSE:Factory/.bash-completion.new.1766/bash-completion.changes    
    2023-08-18 19:27:12.043191255 +0200
@@ -1,0 +2,10 @@
+Thu Aug 17 12:28:28 UTC 2023 - Dr. Werner Fink <wer...@suse.de>
+
+- Modify patches
+  * ls-completion-boo889319.patch
+  * rm-completion-smart-boo958462.patch
+  to avoid skipping spaces after last word on command line (boo#1210974)
+- Add patch fix_quote_readline_by_ref.patch
+  * Do not escape leading ~ nor backslash and avoid empty quoting
+
+-------------------------------------------------------------------

New:
----
  fix_quote_readline_by_ref.patch

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

Other differences:
------------------
++++++ bash-completion.spec ++++++
--- /var/tmp/diff_new_pack.KboI4C/_old  2023-08-18 19:27:13.035193034 +0200
+++ /var/tmp/diff_new_pack.KboI4C/_new  2023-08-18 19:27:13.039193041 +0200
@@ -1,7 +1,7 @@
 #
-# spec file for package bash
+# spec file
 #
-# Copyright (c) 2022 SUSE LLC
+# Copyright (c) 2023 SUSE LLC
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -72,6 +72,8 @@
 Patch14:        bsc1199724-modules.patch
 # PATCH-FIX-UPSTREAM bsc#1200791
 Patch15:        fix-curl-help-completion-bsc1200791.patch
+# PATCH-FIX-SUSE -- avoid broken quotes ands escapes
+Patch16:        fix_quote_readline_by_ref.patch
 BuildRequires:  libtool
 BuildRequires:  pkgconfig
 BuildArch:      noarch

++++++ fix_quote_readline_by_ref.patch ++++++
From: JuanJo Ciarlante <j...@canonical.com>
Subject: fix _quote_readline_by_ref to:
 - avoid escaping 1st '~' (lp: #1288314)
 - avoid quoting if empty, else expansion without args only shows dirs
   (lp: #1288031)
 - replace double escaping to single (eg for completing file/paths with
   spaces)
Origin: vendor, https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=739835
Bug-Debian: https://bugs.debian.org/739835
Forwarded: yes, <5328f418....@canonical.com>

---
 bash_completion |   13 ++++++++++++-
 1 file changed, 12 insertions(+), 1 deletion(-)

--- a/bash_completion
+++ b/bash_completion   2023-08-17 12:16:26.654187550 +0000
@@ -542,13 +542,24 @@ __ltrim_colon_completions()
 # @param $2  Name of variable to return result to
 _quote_readline_by_ref()
 {
-    if [[ $1 == \'* ]]; then
+    if [ -z "$1" ]; then
+        # avoid quoting if empty
+        printf -v $2 %s "$1"
+    elif [[ $1 == \'* ]]; then
         # Leave out first character
         printf -v $2 %s "${1:1}"
+    elif [[ $1 == ~* ]]; then
+        # avoid escaping first ~
+        printf -v $2 ~%q "${1:1}"
     else
         printf -v $2 %q "$1"
     fi
 
+    # Replace double escaping ( \\ ) by single ( \ )
+    # This happens always when argument is already escaped at cmdline,
+    # and passed to this function as e.g.: file\ with\ spaces
+    [[ ${!2} == *\\* ]] && printf -v $2 %s "${1//\\\\/\\}"
+
     # If result becomes quoted like this: $'string', re-evaluate in order to
     # drop the additional quoting.  See also:
     # 
https://www.mail-archive.com/bash-completion-devel@lists.alioth.debian.org/msg01942.html

++++++ ls-completion-boo889319.patch ++++++
--- /var/tmp/diff_new_pack.KboI4C/_old  2023-08-18 19:27:13.179193292 +0200
+++ /var/tmp/diff_new_pack.KboI4C/_new  2023-08-18 19:27:13.183193299 +0200
@@ -16,7 +16,7 @@
      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 -F _longopt -o bashdefault -o default -o filenames -o nospace ls ll 
la l ls-l lf
++complete -F _longopt -o bashdefault -o default -o filenames ls ll la l ls-l lf
  
  declare -Ag _xspecs
  

++++++ rm-completion-smart-boo958462.patch ++++++
--- /var/tmp/diff_new_pack.KboI4C/_old  2023-08-18 19:27:13.207193343 +0200
+++ /var/tmp/diff_new_pack.KboI4C/_new  2023-08-18 19:27:13.211193350 +0200
@@ -11,7 +11,7 @@
 ===================================================================
 --- bash-completion-2.11.orig/bash_completion
 +++ bash-completion-2.11/bash_completion
-@@ -2096,11 +2096,13 @@ _longopt()
+@@ -2096,11 +2096,12 @@ _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 \
@@ -20,9 +20,8 @@
      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 -F _longopt -o bashdefault -o default -o filenames -o nospace ls ll 
la l ls-l lf
-+complete -F _longopt -o bashdefault -o default -o filenames -o nospace rm 
rmdir
-+
+ complete -F _longopt -o bashdefault -o default -o filenames ls ll la l ls-l lf
++complete -F _longopt -o bashdefault -o default -o filenames rm rmdir
  
  declare -Ag _xspecs
  

Reply via email to