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

comments in completion

A few months ago, there was a thread about programming completion for jobs.
For such a use, listing the available job numbers isn't quite what you want
because it's not very informative, so ech job number was annotated with its
corresponding command line. The annotation was originally done with '#' which
only works if you allow comments on the command line, so another suggestion was
done, using ";:", which mostly works just as well (except when you have ';' or
some such characters in the annotation, of course).
Another limitation of those two alternatives is that the annotation
terminates the command, so that it can't be used to do "kill %bla %bli".

What we really want is a way to put annotations that are understood by the
completion mechanism, so that they are printed when listing alternatives, but
they are not added to the command line.

This would come in handy for all completion of numbers like job numbers,
process ids, ...
And it would also be handy in order to provide online help for option flags,

        > grep -[TAB]
        i - case insensitive
        n - print line numbers
        C - print surrounding context
        > grep -

I'm currently using 3.0.5 and there is no such thing in there, so is that
supposed to be coming up for zsh-3.2 or not yet ?


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