From 2237f7376e4259eb068399a2baa56d246d038dae Mon Sep 17 00:00:00 2001 From: Peter Stephenson Date: Sat, 15 Aug 2009 16:59:21 +0000 Subject: users/14307: end of command line in completion with variant zsh syntax --- Src/Zle/zle_tricky.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'Src/Zle') 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. */ -- cgit 1.4.1