Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: How to do completion with read?
- X-seq: zsh-users 2718
- From: Francis GALIEGUE <francis@xxxxxxxxxxxxxxxx>
- To: zsh-users@xxxxxxxxxxxxxxx
- Subject: Re: How to do completion with read?
- Date: 03 Nov 1999 18:10:32 +0100
- In-reply-to: Paul Lew's message of "Wed, 3 Nov 1999 08:52:24 -0800 (PST)"
- Mailing-list: contact zsh-users-help@xxxxxxxxxxxxxx; run by ezmlm
- References: <14368.26696.664675.141950@xxxxxxxxxxxxxxxxxxxxxxx>
- Sender: fg@xxxxxxxxxxxxxxxx
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