summaryrefslogtreecommitdiff
path: root/Src/Zle/computil.c
diff options
context:
space:
mode:
authorPeter Stephenson <pws@users.sourceforge.net>2009-08-17 21:06:03 +0000
committerPeter Stephenson <pws@users.sourceforge.net>2009-08-17 21:06:03 +0000
commitc81ba09d8f3a44570267e96801584adf298fb9e3 (patch)
treef22fa1478485f412e1b5ae46e05b9b8c23ee28c6 /Src/Zle/computil.c
parent0600ab5c99edc0030e98ee2863850df2f7a057fb (diff)
downloadzsh-c81ba09d8f3a44570267e96801584adf298fb9e3.tar.gz
zsh-c81ba09d8f3a44570267e96801584adf298fb9e3.zip
27218: don't unquote $line generated in comparguments for _arguments
Diffstat (limited to 'Src/Zle/computil.c')
-rw-r--r--Src/Zle/computil.c18
1 files changed, 16 insertions, 2 deletions
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);