From: DervishD <zsh@dervishd.net>
To: Zsh Users <zsh-users@sunsite.dk>
Subject: compadd and an array parameter
Date: Tue, 26 Oct 2004 18:59:02 +0200 [thread overview]
Message-ID: <20041026165902.GA6546@DervishD> (raw)
Hi all :)
I'm playing (again) with the completion code, and I've written
something like this:
bindkey "^O" completer
zle -C completer expand-or-complete completer
function completer () {
[[ $compstate[context] = "command" ]] && compadd ${commands##*/}
return 0
}
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?
Of course, I could examine 'CURRENT', perform a match and include
only that match in the compadd command line, but I'm curious...
Thanks a lot in advance :)
Raúl Núñez de Arenas Coronado
--
Linux Registered User 88736
http://www.dervishd.net & http://www.pleyades.net/
next reply other threads:[~2004-10-26 16:57 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-10-26 16:59 DervishD [this message]
2004-10-27 15:06 ` DervishD
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=20041026165902.GA6546@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).