1
0
Fork 0
mirror of git://git.code.sf.net/p/zsh/code synced 2025-09-04 22:51:42 +02:00

make compvalues unquote the string from the line like comparguments does (16998)

This commit is contained in:
Sven Wischnowsky 2002-04-17 07:28:17 +00:00
parent b3e7ac2f75
commit f78df94c6a
2 changed files with 25 additions and 3 deletions

View file

@ -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 Felix Rosencrantz <f_rosencrantz@yahoo.com>
* 16956: Completion/Unix/Command/_java: Changed to use

View file

@ -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;