Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: Completion of prefix redirections is -command- instead of -redirect-

On Thu, Aug 27, 2015 at 6:47 AM, Bart Schaefer
<schaefer@xxxxxxxxxxxxxxxx> wrote:
> On Aug 26,  9:35pm, Bart Schaefer wrote:
> }
> } Does this do it?
> To answer my own question, no, it doesn't ... or at least not entirely.
> Both WITH and WITHOUT the change in 36285, completing after this:
> % ls < ;
> completes files rather than commands.  I suppose if you've botched the
> syntax you have no right to expect sanity, and the foregoing hasn't
> changed since 5.0.7, so we're no worse off.

Yeah, it's better than either with or without the 36285 patch, but
still doesn't handle all cases,

< <tab> gives files (correct)
; <tab> gives commands (correct)
< ; <tab> gives commands (correct)
foo < ; <tab> gives files (wrong-ish)
; < <tab> gives commands (wrong)
foo=bar; < <tab> gives commands (wrong, presumably same case as the above)
; < : <tab> gives commands (correct)
; < : : <tab> gives files (correct)

Is there any reason we can't just reset state to 'this is a new
command' when we see an unquoted solo semicolon? Or is determining
that this is the case in fact the trouble?

Mikael Magnusson

Messages sorted by: Reverse Date, Date, Thread, Author