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

Re: #conpdef and compadd -> command regex



On 15/06/2012, Eric Smith <es@xxxxxxxxxxxx> wrote:
> Thank Mikael
>
> That works but I realise that I only want completion if the
> command commences with a single underscore. How would I define a
> regex for the command that needs to be satisfied for the compadd
> rule to apply?

You can't afaik, but in your completer you can do whatever you want,
including checking what the word looks like and calling another
completer if it's not what you want. (I'll admit I don't know which
that would be in this case, _command_names is close, but _autocd could
also be called depending on options).

-- 
Mikael Magnusson



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