diff options
Diffstat (limited to 'Src')
-rw-r--r-- | Src/hist.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/Src/hist.c b/Src/hist.c index d1af30a29..bd650e81e 100644 --- a/Src/hist.c +++ b/Src/hist.c @@ -521,6 +521,12 @@ histsubchar(int c) } c = ingetc(); } + if (ptr == buf && + (c == '}' || c == ';' || c == '\'' || c == '"' || c == '`')) { + /* Neither event nor word designator, no expansion */ + safeinungetc(c); + return bangchar; + } *ptr = 0; if (!*buf) { if (c != '%') { |