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

Re: compset -q oddities



Bart Schaefer wrote on Sun, Sep 11, 2016 at 19:14:22 -0700:
> On Sep 11,  7:30am, Daniel Shahaf wrote:
> }
> } I managed to break a few things while composing a reply to 39265:
> 
> I think mostly what you've discovered is cases where "compset" is not
> compensating for pilot error.  "compset -q" does not expect to be
> called on an empty word, or on any word that can't be interpreted as
> a (possibly partial) command line;

Thanks, but I don't understand how any of those examples constitutes
a "pilot error" or an empty word.

In #1, "~~~" is a complete word; completion changed it to "~~~~~~" which
is also a complete word but wasn't a candidate completion.

In #2 and #3, the input is a prefix of a valid command line («g
$'\'foo\''» and «h "$'foo'"» respectively).  #2 does not involve an
empty word; the word there is «'» (a single-byte word).

Thanks again for the explanation.  I'd like to understand what the
expected behaviour here is.  They triggered DPUTS calls so I assumed
they were bugs.

Cheers,

Daniel
(#2 doesn't call compadd, but behaves the same if a call to _nothing is
added to _g.)



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