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

Re: How to do completion with read?



Paul Lew <paullew@xxxxxxxxx> writes:

> Is there a way to use completion mechanism when prompt user for input
> in zsh function/scripts?  For example,
> 
> echo -n "Enter choice: "
> read -C '-k "(orange apple banana)"' choice
> 
> The example about use imaginary option '-C' which tell zsh to pass the
> next argument as compctl argument.
> 
> Any help will be appreciated...
> 

You can use select for this, although it does not do completion.

-- 
fg

# rm *;o
o: command not found



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