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

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

Keijiro Ehara wrote:

> I was using compctl before but now i decided to use compsys.
> When i use a little modified zsh-4.0.2/StartupFiles/zshrc as ~/.zshrc,
> my zsh won't complete backquote and etc. like below.
> pote% kill -HUP `cat /var/run/in[TAB]
> pote% kill -HUP `cat /var/run/inetd.pid
> With compctl, i got
> pote% kill -HUP `cat /var/run/inetd.pid`
> and, i expect it.
> Is it just because i omit some option?

No, you didn't miss an option. The new completion system just doesn't
complete the backquote.
Incidentally, you could also write your above command as:
  kill -HUP $(</var/run/inetd.pid)

Again, here it won't complete the closing bracket I'm afraid. $( ... )
is like backquotes but has some advantages and with the initial <, it
works like you used the cat command.

Suffix handling is the next area where changes are likely to take place
with the new completion system. This will probably take the form of
moving more of the context handling to shell code and allowing it to
handle more syntax constructs. At the moment, I don't think the shell
code can tell if it is in $( .. ) and we can't complete things like
history modifiers and glob qualifiers. You could probably actually
modify shell code (probably _main_complete) to complete the backquote


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