[Pkg-zsh-commits] [zsh] 01/02: Cherry-pick 771381c2+dd8079e0 to fix $((...)) completion

Axel Beckert abe at deuxchevaux.org
Sun Jul 26 18:32:59 UTC 2015


This is an automated email from the git hooks/post-receive script.

abe pushed a commit to branch debian
in repository zsh.

commit 92f59b31b2abbda326d6244f3abb65997ca4de43
Author: Axel Beckert <abe at deuxchevaux.org>
Date:   Sun Jul 26 19:56:12 2015 +0200

    Cherry-pick 771381c2+dd8079e0 to fix $((...)) completion
    
    Closes: #793168
---
 ...)-completion-in-expand-or-complete-widget.patch | 32 ++++++++++++++++++
 ...fix-$((...))-completion-by-_expand-widget.patch | 38 ++++++++++++++++++++++
 debian/patches/series                              |  2 ++
 3 files changed, 72 insertions(+)

diff --git a/debian/patches/cherry-pick-771381c2-fix-$((...))-completion-in-expand-or-complete-widget.patch b/debian/patches/cherry-pick-771381c2-fix-$((...))-completion-in-expand-or-complete-widget.patch
new file mode 100644
index 0000000..c325748
--- /dev/null
+++ b/debian/patches/cherry-pick-771381c2-fix-$((...))-completion-in-expand-or-complete-widget.patch
@@ -0,0 +1,32 @@
+Description: 35908: fix $((...)) completion in expand-or-complete widget
+Origin: commit 771381c2ce0587d825528d49244006edf770fd47
+Author: Peter Stephenson <p.w.stephenson at ntlworld.com>
+Bug-Debian: https://bugs.debian.org/793168
+
+Index: zsh/Src/Zle/zle_tricky.c
+===================================================================
+--- zsh.orig/Src/Zle/zle_tricky.c	2015-07-26 19:50:33.237182978 +0200
++++ zsh/Src/Zle/zle_tricky.c	2015-07-26 19:50:33.237182978 +0200
+@@ -730,11 +730,12 @@
+ 		    }
+ 		}
+ 	    }
+-	    if (lst == COMP_EXPAND_COMPLETE)
++	    if (lst == COMP_EXPAND_COMPLETE) {
+ 		do {
+ 		    /* Check if there is a parameter expression. */
+ 		    for (; *q && *q != String; q++);
+-		    if (*q == String && q[1] != Inpar && q[1] != Inbrack) {
++		    if (*q == String && q[1] != Inpar && q[1] != Inparmath &&
++			q[1] != Inbrack) {
+ 			if (*++q == Inbrace) {
+ 			    if (! skipparens(Inbrace, Outbrace, &q) &&
+ 				q == s + zlemetacs - wb)
+@@ -778,6 +779,7 @@
+ 		    } else
+ 			break;
+ 		} while (q < s + zlemetacs - wb);
++	    }
+ 	    if (lst == COMP_EXPAND_COMPLETE) {
+ 		/* If it is still not clear if we should use expansion or   *
+ 		 * completion and there is a `$' or a backtick in the word, *
diff --git a/debian/patches/cherry-pick-dd8079e0-fix-$((...))-completion-by-_expand-widget.patch b/debian/patches/cherry-pick-dd8079e0-fix-$((...))-completion-by-_expand-widget.patch
new file mode 100644
index 0000000..39fc4c9
--- /dev/null
+++ b/debian/patches/cherry-pick-dd8079e0-fix-$((...))-completion-by-_expand-widget.patch
@@ -0,0 +1,38 @@
+Description: 35809: fix $((...)) completion by _expand widget.
+ This changes internal quoting of the form still including tokens
+ not to add unnecessary internal backslashes.
+Origin: commit dd8079e0415cf213d9bb5d41d1ad95c04b774f3a
+Author: Peter Stephenson <p.w.stephenson at ntlworld.com>
+Bug-Debian: https://bugs.debian.org/793168
+
+Index: zsh/Src/utils.c
+===================================================================
+--- zsh.orig/Src/utils.c	2015-07-26 19:50:39.037207942 +0200
++++ zsh/Src/utils.c	2015-07-26 19:50:39.037207942 +0200
+@@ -5301,7 +5301,25 @@
+ 		/* Needs to be passed straight through. */
+ 		if (dobackslash)
+ 		    *v++ = '\\';
+-		*v++ = *u++;
++		if (*u == Inparmath) {
++		    /*
++		     * Already syntactically quoted: don't
++		     * add more.
++		     */
++		    int inmath = 1;
++		    *v++ = *u++;
++		    for (;;) {
++			char uc = *u;
++			*v++ = *u++;
++			if (uc == '\0')
++			    break;
++			else if (uc == Outparmath && !--inmath)
++			    break;
++			else if (uc == Inparmath)
++			    ++inmath;
++		    }
++		} else
++		    *v++ = *u++;
+ 		continue;
+ 	    }
+ 
diff --git a/debian/patches/series b/debian/patches/series
index ff6dd92..7e18fd1 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -2,3 +2,5 @@ further-mitigate-test-suite-hangs.patch
 cherry-pick-ef080283-handle-failure-of-gettempname-in-namedpipe.patch
 cherry-pick-811027a2-fix-signal-queueing-in-zcontext_save_partial-790282.patch
 cherry-pick-7bc47c91-prompt_adam1_setup-fix-perl-5.22-warnings.patch
+cherry-pick-771381c2-fix-$((...))-completion-in-expand-or-complete-widget.patch
+cherry-pick-dd8079e0-fix-$((...))-completion-by-_expand-widget.patch

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/collab-maint/zsh.git



More information about the Pkg-zsh-commits mailing list