summary refs log tree commit diff
path: root/Src/Zle
diff options
context:
space:
mode:
Diffstat (limited to 'Src/Zle')
-rw-r--r--Src/Zle/zle_tricky.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/Src/Zle/zle_tricky.c b/Src/Zle/zle_tricky.c
index 1fcb4dee6..1856911dc 100644
--- a/Src/Zle/zle_tricky.c
+++ b/Src/Zle/zle_tricky.c
@@ -1211,7 +1211,15 @@ get_comp_string(void)
 	    (ins == 2 && i == 2) || (ins == 3 && i == 3) ||
 	    tok == BAR    || tok == AMPER     ||
 	    tok == BARAMP || tok == AMPERBANG ||
-	    ((tok == DBAR || tok == DAMPER) && !incond)) {
+	    ((tok == DBAR || tok == DAMPER) && !incond) ||
+	    /*
+	     * Special case: we might reach a new command (incmdpos set)
+	     * if we've already found the string we're completing (tt set)
+	     * without hitting one of the above if we're using one of
+	     * the special zsh forms of delimiting for conditions and
+	     * loops that I really loathe having to support.
+	     */
+	    (tt && incmdpos)) {
 	    /* This is one of the things that separate commands.  If we  *
 	     * already have the things we need (e.g. the token strings), *
 	     * leave the loop.                                           */