about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rw-r--r--Src/Zle/computil.c23
2 files changed, 25 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index 18fc5e83e..008ff89ea 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2002-04-17  Sven Wischnowsky  <wischnow@zsh.org>
+
+	* 16998: Src/Zle/computil.c: make compvalues unquote the string
+	from the line like comparguments does
+
 2002-04-16  Sven Wischnowsky  <wischnow@zsh.org>
 
 	* users/4836: Completion/Unix/Type/_path_files: make
diff --git a/Src/Zle/computil.c b/Src/Zle/computil.c
index 155c883f6..fed165561 100644
--- a/Src/Zle/computil.c
+++ b/Src/Zle/computil.c
@@ -2319,6 +2319,23 @@ cv_get_val(Cvdef d, char *name)
     return NULL;
 }
 
+static Cvval
+cv_quote_get_val(Cvdef d, char *name)
+{
+    int ne;
+
+    /* remove quotes */
+    name = dupstring(name);
+    ne = noerrs;
+    noerrs = 2;
+    parse_subst_string(name);
+    noerrs = ne;
+    remnulargs(name);
+    untokenize(name);
+
+    return cv_get_val(d, name);
+}
+
 /* Handle a xor list. */
 
 static void
@@ -2371,7 +2388,7 @@ cv_next(Cvdef d, char **sp, char **ap)
         do {
             sav = *++s;
             *s = '\0';
-            if ((r = cv_get_val(d, v))) {
+            if ((r = cv_quote_get_val(d, v))) {
                 *s = sav;
 
                 break;
@@ -2415,7 +2432,7 @@ cv_next(Cvdef d, char **sp, char **ap)
             sav = *sap;
             *sap = '\0';
         }
-        if ((!(r = cv_get_val(d, s)) || r->type == CVV_NOARG) && skip)
+        if ((!(r = cv_quote_get_val(d, s)) || r->type == CVV_NOARG) && skip)
             ns = as;
 
         if (sap)
@@ -2437,7 +2454,7 @@ cv_next(Cvdef d, char **sp, char **ap)
         } else
             *ap = sap = NULL;
 
-        r = cv_get_val(d, s);
+        r = cv_quote_get_val(d, s);
 
         if (sap)
             *sap = sav;