diff options
| author | Peter Stephenson <p.w.stephenson@ntlworld.com> | 2017-08-09 19:57:47 +0100 |
|---|---|---|
| committer | Peter Stephenson <p.w.stephenson@ntlworld.com> | 2017-08-09 19:57:47 +0100 |
| commit | cfd34c75ac10e05a9573f6b26d3cb2d08b269f6a (patch) | |
| tree | 0fcf5d73fb8340638e25055c63415b8410ffe670 /Src/lex.c | |
| parent | unposted: update to 5.4.1-dev-0 (diff) | |
| download | zsh-cfd34c75ac10e05a9573f6b26d3cb2d08b269f6a.tar zsh-cfd34c75ac10e05a9573f6b26d3cb2d08b269f6a.tar.gz zsh-cfd34c75ac10e05a9573f6b26d3cb2d08b269f6a.tar.bz2 zsh-cfd34c75ac10e05a9573f6b26d3cb2d08b269f6a.tar.lz zsh-cfd34c75ac10e05a9573f6b26d3cb2d08b269f6a.tar.xz zsh-cfd34c75ac10e05a9573f6b26d3cb2d08b269f6a.tar.zst zsh-cfd34c75ac10e05a9573f6b26d3cb2d08b269f6a.zip | |
41504: make empty strings work in case patterns with no leading parenthesis
Diffstat (limited to 'Src/lex.c')
| -rw-r--r-- | Src/lex.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -760,7 +760,7 @@ gettok(void) return AMPER; case LX1_BAR: d = hgetc(); - if (d == '|') + if (d == '|' && !incasepat) return DBAR; else if (d == '&') return BARAMP; @@ -1058,7 +1058,7 @@ gettokstr(int c, int sub) if (isset(SHGLOB)) { if (sub || in_brace_param) break; - if (incasepat && !lexbuf.len) + if (incasepat > 0 && !lexbuf.len) return INPAR; if (!isset(KSHGLOB) && lexbuf.len) goto brk; @@ -1859,7 +1859,7 @@ exalias(void) Reswd rw; hwend(); - if (interact && isset(SHINSTDIN) && !strin && !incasepat && + if (interact && isset(SHINSTDIN) && !strin && incasepat <= 0 && tok == STRING && !nocorrect && !(inbufflags & INP_ALIAS) && (isset(CORRECTALL) || (isset(CORRECT) && incmdpos))) spckword(&tokstr, 1, incmdpos, 1); |
