From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23640 invoked from network); 18 Sep 2003 17:08:39 -0000 Received: from sunsite.dk (130.225.247.90) by ns1.primenet.com.au with SMTP; 18 Sep 2003 17:08:39 -0000 Received: (qmail 5400 invoked by alias); 18 Sep 2003 17:08:05 -0000 Mailing-List: contact zsh-users-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 6599 Received: (qmail 5367 invoked from network); 18 Sep 2003 17:08:04 -0000 Received: from localhost (HELO sunsite.dk) (127.0.0.1) by localhost with SMTP; 18 Sep 2003 17:08:04 -0000 X-MessageWall-Score: 0 (sunsite.dk) Received: from [212.227.126.184] by sunsite.dk (MessageWall 1.0.8) with SMTP; 18 Sep 2003 17:8:4 -0000 Received: from [212.227.126.162] (helo=mrelayng.kundenserver.de) by moutng.kundenserver.de with esmtp (Exim 3.35 #1) id 1A02GC-0007bv-00 for zsh-users@sunsite.dk; Thu, 18 Sep 2003 19:08:04 +0200 Received: from [217.224.226.13] (helo=zaphod.home.lan) by mrelayng.kundenserver.de with asmtp (TLSv1:EDH-RSA-DES-CBC3-SHA:168) (Exim 3.35 #1) id 1A02GB-0006jJ-00 for zsh-users@sunsite.dk; Thu, 18 Sep 2003 19:08:03 +0200 Received: from anarchy.home.lan (anarchy.home.lan [3ffe:b80:24b:1:20c:76ff:fe13:cf8a]) by zaphod.home.lan (8.11.6/8.11.6) with ESMTP id h8IH81n06916 for ; Thu, 18 Sep 2003 19:08:01 +0200 From: Malte Starostik To: zsh-users@sunsite.dk Subject: Completing possible elements of a comma-separated list Date: Thu, 18 Sep 2003 19:07:58 +0200 User-Agent: KMail/1.5.9 X-Security-Warning: All Your Base Are Belong To Us! MIME-Version: 1.0 Content-Disposition: inline Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <200309181908.01862.malte.starostik@t-online.de> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi, I'm trying to write a completion for slptool. One of its commands is slptool findattrs [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 completes to (already works with the above): slptool findattrs example.acme username, continuing: slptool findattrs example.acme username,p 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 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-----