Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: compadd and an array parameter
- X-seq: zsh-users 8135
- From: DervishD <zsh@xxxxxxxxxxxx>
- To: Zsh Users <zsh-users@xxxxxxxxxx>
- Subject: Re: compadd and an array parameter
- Date: Wed, 27 Oct 2004 17:06:25 +0200
- In-reply-to: <20041026165902.GA6546@DervishD>
- Mail-followup-to: Zsh Users <zsh-users@xxxxxxxxxx>
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
- Organization: DervishD
- References: <20041026165902.GA6546@DervishD>
Hi all :)
My excuses again for self-replying...
* DervishD <zsh@xxxxxxxxxxxx> dixit:
[...]
> [[ $compstate[context] = "command" ]] && compadd ${commands##*/}
[...]
> Well, what I want is to complete using the contents of the
> 'commands' array, but with the path stripped, but I think that the
> compadd command above will lead to a very big expansion. Can I tell
> compadd something like 'compadd -a commands' and something more to
> make it strip the path or the expansion above is the only way?
Better 'compadd -k commands'. The keys of the 'commands'
associative array are the command names, without path. I don't know
what I was thinking...
Sorry for the noise. What a day...
Raúl Núñez de Arenas Coronado
--
Linux Registered User 88736
http://www.dervishd.net & http://www.pleyades.net/
Messages sorted by:
Reverse Date,
Date,
Thread,
Author