diff options
| author | tjg <tjg> | 2001-10-02 13:00:35 +0000 |
|---|---|---|
| committer | Toby Goodwin <toby@paccrat.org> | 2015-05-16 21:23:19 +0100 |
| commit | a11a8d312e531231ed4d284f3cd129ccf2de2a43 (patch) | |
| tree | c007353858e83d5056bf06632a1a2de09a97fdcb /lex.c | |
| parent | 38da49b97b529815045c23cfef4820a56179eebb (diff) | |
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.
Diffstat (limited to 'lex.c')
| -rw-r--r-- | lex.c | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -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; } |