about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog8
-rw-r--r--Src/Zle/computil.c18
2 files changed, 23 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index be6bd9822..c5cc4d20c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2009-08-17  Peter Stephenson  <p.w.stephenson@ntlworld.com>
+
+	* 27218: Src/Zle/computil.c: don't unquote command line
+	to generate "line" in _arguments since the caller can't
+	tell what was there before.
+
 2009-08-17  Peter Stephenson  <pws@csr.com>
 
 	* 27217: Functions/Newuser/zsh-newuser-install: fix typo
@@ -12085,5 +12091,5 @@
 
 *****************************************************
 * This is used by the shell to define $ZSH_PATCHLEVEL
-* $Revision: 1.4761 $
+* $Revision: 1.4762 $
 *****************************************************
diff --git a/Src/Zle/computil.c b/Src/Zle/computil.c
index f323574ee..f2837ed93 100644
--- a/Src/Zle/computil.c
+++ b/Src/Zle/computil.c
@@ -1866,9 +1866,12 @@ ca_parse_line(Cadef d, int multi, int first)
     Caopt ptr, wasopt = NULL, dopt;
     struct castate state;
     char *line, *oline, *pe, **argxor = NULL;
-    int cur, doff, argend, arglast, ne;
+    int cur, doff, argend, arglast;
     Patprog endpat = NULL, napat = NULL;
     LinkList sopts = NULL;
+#if 0
+    int ne;
+#endif
 
     /* Free old state. */
 
@@ -1927,13 +1930,24 @@ ca_parse_line(Cadef d, int multi, int first)
 	dopt = NULL;
 	doff = state.singles = arglast = 0;
 
-        /* remove quotes */
         oline = line;
+#if 0
+        /*
+	 * remove quotes.
+	 * This is commented out:  it doesn't allow you to discriminate
+	 * between command line values that can be expanded and those
+	 * that can't, and in some cases this generates inconsistency;
+	 * for example, ~/foo\[bar unqotes to ~/foo[bar which doesn't
+	 * work either way---it's wrong if the ~ is quoted, and
+	 * wrong if the [ isn't quoted..  So it's now up to the caller to
+	 * unquote.
+	 */
         line = dupstring(line);
         ne = noerrs;
         noerrs = 2;
         parse_subst_string(line);
         noerrs = ne;
+#endif
         remnulargs(line);
         untokenize(line);