From a11a8d312e531231ed4d284f3cd129ccf2de2a43 Mon Sep 17 00:00:00 2001 From: tjg Date: Tue, 2 Oct 2001 13:00:35 +0000 Subject: Bug: it's no longer possible to use parentheses to sneak a word that needs quoting past the "quoting detector", so `fn x { echo $(x.y) }' now works both in the current rc and its descendants. --- lex.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'lex.c') diff --git a/lex.c b/lex.c index 45b6ddb..291b747 100644 --- a/lex.c +++ b/lex.c @@ -70,11 +70,13 @@ enum filedescriptors { }; /* does this string require quoting? */ -extern bool quotep(char *s) { +extern bool quotep(char *s, bool dollar) { unsigned char c; + const char *meta; + meta = dollar ? dnw : nw; while ((c = *s++)) - if (nw[c]) + if (meta[c]) return TRUE; return FALSE; } -- cgit v1.2.3