diff options
Diffstat (limited to 'Src')
-rw-r--r-- | Src/Zle/computil.c | 23 |
1 files changed, 20 insertions, 3 deletions
diff --git a/Src/Zle/computil.c b/Src/Zle/computil.c index b5610fb77..a426a9a5b 100644 --- a/Src/Zle/computil.c +++ b/Src/Zle/computil.c @@ -2768,6 +2768,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 @@ -2820,7 +2837,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; @@ -2864,7 +2881,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) @@ -2886,7 +2903,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; |