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

Re: The zsh equivalent to Bash's "complete -W" to complete a command using only a list of words



On Apr 9,  2:49pm, Peter Stephenson wrote:
}
} On Sat, 09 Apr 2016 16:40:52 +0300
} Shlomi Fish <shlomif@xxxxxxxxx> wrote:
} > In addition to that I was told on IRC that I can do this:
} > 
} >     compdef "_values $description $val1 $val2 $val3 $val4..." Theme
} > 
} > Where $description is a short description and $val1 $val2 are the values.
} 
} Yes, it does work... you learn something new every day.

And of course to literally satisfy the "I want a shell command/built-in
for this" request, there's always the venerable

    compctl -X $description -k "($val1 $val2 $val3 $val4...)" Theme




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