diff options
author | Axel Beckert <abe@deuxchevaux.org> | 2013-12-20 22:09:32 +0100 |
---|---|---|
committer | Axel Beckert <abe@deuxchevaux.org> | 2013-12-20 22:09:32 +0100 |
commit | 59152a34666d43575fe2f0bb7c11ef285c9be51f (patch) | |
tree | 54ae214efb56706c0e2c647b65dfcad3828d690e /Src/Zle/zle_tricky.c | |
parent | 3e96d261c83af40534acbf79c5d236ecf38af9fe (diff) | |
parent | 58614f16693a741396840fbb3db0f9ba1e53cfcb (diff) | |
download | zsh-59152a34666d43575fe2f0bb7c11ef285c9be51f.tar.gz zsh-59152a34666d43575fe2f0bb7c11ef285c9be51f.zip |
New upstream release
Diffstat (limited to 'Src/Zle/zle_tricky.c')
-rw-r--r-- | Src/Zle/zle_tricky.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/Src/Zle/zle_tricky.c b/Src/Zle/zle_tricky.c index e30e0b1aa..25f09c459 100644 --- a/Src/Zle/zle_tricky.c +++ b/Src/Zle/zle_tricky.c @@ -1504,7 +1504,17 @@ get_comp_string(void) nnb = s + MB_METACHARLEN(s); else nnb = s; - for (tt = s; tt < s + zlemetacs_qsub - wb;) { + tt = s; + if (lincmd) + { + /* + * Ignore '['s at the start of a command as they're not + * matched by closing brackets. + */ + while (*tt == Inbrack && tt < s + zlemetacs_qsub - wb) + tt++; + } + while (tt < s + zlemetacs_qsub - wb) { if (*tt == Inbrack) { i++; nb = nnb; |