From 3d638d83843a4817c853896ddfe8575f02bd7791 Mon Sep 17 00:00:00 2001 From: "David Kaspar [Dee'Kej]" Date: Tue, 3 May 2016 15:06:31 +0200 Subject: [PATCH] tcsh-6.19.00-016-do-not-quote-name-expanded-by-completion.patch added > don't quote the expanded by completion name otherwise > "echo $vers" prints Illegal variable name. --- ...ot-quote-name-expanded-by-completion.patch | 62 +++++++++++++++++++ tcsh.spec | 2 + 2 files changed, 64 insertions(+) create mode 100644 tcsh-6.19.00-016-do-not-quote-name-expanded-by-completion.patch diff --git a/tcsh-6.19.00-016-do-not-quote-name-expanded-by-completion.patch b/tcsh-6.19.00-016-do-not-quote-name-expanded-by-completion.patch new file mode 100644 index 0000000..f15f8e1 --- /dev/null +++ b/tcsh-6.19.00-016-do-not-quote-name-expanded-by-completion.patch @@ -0,0 +1,62 @@ +From 619fc5790690dc8e0b5b955f7ffb2cd0d0e3626f Mon Sep 17 00:00:00 2001 +From: christos +Date: Wed, 26 Aug 2015 07:57:17 +0000 +Subject: [PATCH 1/2] don't quote the expanded by completion name otherwise "echo + $vers" prints Illegal variable name. + +--- + tw.parse.c | 1 - + 1 file changed, 1 deletion(-) + +diff --git a/tw.parse.c b/tw.parse.c +index 94982d6..e506e8d 100644 +--- a/tw.parse.c ++++ b/tw.parse.c +@@ -1332,7 +1332,6 @@ tw_fixword(int looking, struct Strbuf *word, Char *dir, Char *exp_name) + break; + } + +- (void) quote(exp_name); + Strbuf_append(word, exp_name); /* add extended name */ + Strbuf_terminate(word); + } /* end tw_fixword */ +-- +2.5.5 + +From 6988dbc74d5c5ebed0bd8378793f9315dd8f7651 Mon Sep 17 00:00:00 2001 +From: christos +Date: Fri, 16 Oct 2015 14:59:56 +0000 +Subject: [PATCH 2/2] Fix quoting problem with tab completing a file with a + space not having a backslash inserted. Revert previous fix and fix the real + bug in the quoting invalid byte check. + +--- + tw.parse.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/tw.parse.c b/tw.parse.c +index e506e8d..affcf55 100644 +--- a/tw.parse.c ++++ b/tw.parse.c +@@ -621,9 +621,8 @@ insert_meta(const Char *cp, const Char *cpend, const Char *word, + #if INVALID_BYTE != 0 + /* add checking INVALID_BYTE for FIX UTF32 */ + if ((w & INVALID_BYTE) != INVALID_BYTE) /* w < INVALID_BYTE */ +-#else +- w &= ~QUOTE; + #endif ++ w &= ~QUOTE; + + if (cmap(w, _ESC | _QF)) + wq = QUOTE; /* quotes are always quoted */ +@@ -1332,6 +1331,7 @@ tw_fixword(int looking, struct Strbuf *word, Char *dir, Char *exp_name) + break; + } + ++ (void) quote(exp_name); + Strbuf_append(word, exp_name); /* add extended name */ + Strbuf_terminate(word); + } /* end tw_fixword */ +-- +2.5.5 + diff --git a/tcsh.spec b/tcsh.spec index 6f38f5c..0afffd7 100644 --- a/tcsh.spec +++ b/tcsh.spec @@ -44,6 +44,7 @@ Patch012: tcsh-6.19.00-012-display-default-in-editor.patch Patch013: tcsh-6.19.00-013-VImode-variable-provided.patch Patch014: tcsh-6.19.00-014-do-not-use-union-wait.patch Patch015: tcsh-6.19.00-015-set-LC_COLLATE-to-C-and-add-HTML-makefile.patch +Patch016: tcsh-6.19.00-016-do-not-quote-name-expanded-by-completion.patch # Downstream patches -- these should be always included when doing rebase: @@ -180,6 +181,7 @@ fi tcsh-6.19.00-013-VImode-variable-provided.patch tcsh-6.19.00-014-do-not-use-union-wait.patch tcsh-6.19.00-015-set-LC_COLLATE-to-C-and-add-HTML-makefile.patch + tcsh-6.19.00-016-do-not-quote-name-expanded-by-completion.patch * Thu Apr 21 2016 David Kaspar [Dee'Kej] - 6.19.00-6 - Drop tcsh-6.15.00-closem.patch - issue not reproducible, patch not accepted by upstream