From: DervishD <zsh@dervishd.net>
To: Zsh Users <zsh-users@sunsite.dk>
Subject: Re: compadd and an array parameter
Date: Wed, 27 Oct 2004 17:06:25 +0200 [thread overview]
Message-ID: <20041027150625.GC10003@DervishD> (raw)
In-Reply-To: <20041026165902.GA6546@DervishD>
Hi all :)
My excuses again for self-replying...
* DervishD <zsh@dervishd.net> 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/
prev parent reply other threads:[~2004-10-27 15:03 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-10-26 16:59 DervishD
2004-10-27 15:06 ` DervishD [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20041027150625.GC10003@DervishD \
--to=zsh@dervishd.net \
--cc=zsh-users@sunsite.dk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).