Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Completion of prefix redirections is -command- instead of -redirect-
- X-seq: zsh-workers 36285
- From: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- To: zsh workers <zsh-workers@xxxxxxx>
- Subject: Re: Completion of prefix redirections is -command- instead of -redirect-
- Date: Wed, 26 Aug 2015 21:35:32 -0700
- In-reply-to: <CAHYJk3S-T6kyx5v7ARo8MP8O7D57ig=eKoXyi2Cr4b+=3W0B3A@mail.gmail.com>
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
- References: <20150826053928.GD19027@tarsus.local2> <150826111808.ZM30185@torch.brasslantern.com> <CAHYJk3S-T6kyx5v7ARo8MP8O7D57ig=eKoXyi2Cr4b+=3W0B3A@mail.gmail.com>
On Aug 27, 2:16am, Mikael Magnusson wrote:
}
} commit 249999cfb485914fe6f8630b1f4079e1227a5097
} Author: Peter Stephenson <p.w.stephenson@xxxxxxxxxxxx>
} Date: Sun Aug 9 18:40:54 2015 +0100
}
} 36025: Fix completion aftoer "foo=bar; setopt ".
}
} Done by catching a case that doesn't seem to be handled otherwise,
} so there's some hope it doesn't screw up too much.
}
} With the above commit reverted, < <tab> completes files again, but so
} does ; <tab>.
Does this do it?
diff --git a/Src/Zle/zle_tricky.c b/Src/Zle/zle_tricky.c
index b87b99b..cb17bde 100644
--- a/Src/Zle/zle_tricky.c
+++ b/Src/Zle/zle_tricky.c
@@ -1184,11 +1184,12 @@ get_comp_string(void)
* considering a new command. Consequently, although this looks
* relatively harmless by itself, it's probably incomplete.
*/
- lincmd = (incmdpos && !ins && !incond) ||
- (oins == 2 && wordpos == 2) ||
- (ins == 3 && wordpos == 1) ||
- (cmdtok == NULLTOK && !incond);
linredir = (inredir && !ins);
+ lincmd = !linredir &&
+ ((incmdpos && !ins && !incond) ||
+ (oins == 2 && wordpos == 2) ||
+ (ins == 3 && wordpos == 1) ||
+ (cmdtok == NULLTOK && !incond));
oins = ins;
/* Get the next token. */
if (linarr)
Messages sorted by:
Reverse Date,
Date,
Thread,
Author