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

Re: How to complete backquote, etc. using compsys?

Bart Schaefer wrote:
> On Aug 23, 10:49am, Oliver Kiddle wrote:
> }
> } No, you didn't miss an option. The new completion system just doesn't
> } complete the backquote.  [...]  At the moment, I don't think the shell
> } code can tell if it is in $( .. )
> Yes, it can tell that it's in $(...) or `...`.

compstate[quote] and compstate[quoting] indicate if it is in `...` but
how can it tell it's in $(...)? The level of nesting would also be

> It doesn't complete the
> trailing backtick or closing paren because there's no way to tell when
> you're really at the end of the expression.  How is it supposed to know
> whether you mean
>     `cat /var/run/inetd.pid`
> or whether you're going to go on with more of the command, as in
>     `cat /var/run/inetd.pid /var/run/sshd.pid`
> or the like?

That's true but it would be useful to have the backquote as a removable
suffix because it is quicker to press space than backquote. A style
could always be used to prevent it. Also, without multios the closing
bracket of $(<...) should always be completed.


This message has been checked for all known viruses by the 
MessageLabs Virus Scanning Service. For further information visit

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