zsh-users
 help / color / mirror / code / Atom feed
* Completing possible elements of a comma-separated list
@ 2003-09-18 17:07 Malte Starostik
  2003-09-19 13:03 ` Oliver Kiddle
  0 siblings, 1 reply; 5+ messages in thread
From: Malte Starostik @ 2003-09-18 17:07 UTC (permalink / raw)
  To: zsh-users

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi,

I'm trying to write a completion for slptool. One of its commands is
    slptool findattrs <service> [attr ids]
where service is an SLP service name or URL and attr ids is a comma-separated
list of attribute ids.
The following works fine for a single id, inserting a comma after it:

compadd -M 'm:{a-zA-Z}={A-Za-z}' -S, -q $(slptool findattrs $words[2] | \
    perl -pi -e 's#\(([^()]+)=[^()]*\),?#$1\n#g')

Now I'd like to continue completion with the same list of possible matches,
completing any id in the comma separated list independently of each other
against the list of available ids.

Example: (possible attribute ids: username password foo bar)
command typed so far:
    slptool findattrs example.acme u<TAB>
completes to (already works with the above):
    slptool findattrs example.acme username,
continuing:
    slptool findattrs example.acme username,p<TAB>
should complete to (this is what I'd like to achieve):
    slptool findattrs example.acme username,password,

Also, would be nice if
    slptool findattrs example.acme u,p<TAB>
could complete to
    slptool findattrs example.acme username,password,
as well.

Many thanks in advance,
- -Malte
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.3 (GNU/Linux)

iD8DBQE/aeZwVDF3RdLzx4cRAq/FAJ9D61VZhfqIxBVlvQeOwLPBBrfLfwCeK3PD
cNMbKjTLWbsO83sMiO8/tZI=
=qeuC
-----END PGP SIGNATURE-----


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2003-09-21  8:17 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-09-18 17:07 Completing possible elements of a comma-separated list Malte Starostik
2003-09-19 13:03 ` Oliver Kiddle
2003-09-19 16:31   ` Malte Starostik
2003-09-20 16:35     ` Oliver Kiddle
2003-09-21  3:38     ` Hello Zsh users jayjwa

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).