From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12360 invoked from network); 23 Jul 1999 06:54:07 -0000 Received: from sunsite.auc.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 23 Jul 1999 06:54:07 -0000 Received: (qmail 4261 invoked by alias); 23 Jul 1999 06:53:46 -0000 Mailing-List: contact zsh-users-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 2459 Received: (qmail 4254 invoked from network); 23 Jul 1999 06:53:46 -0000 Date: Fri, 23 Jul 1999 08:53:43 +0200 (MET DST) Message-Id: <199907230653.IAA04566@beta.informatik.hu-berlin.de> From: Sven Wischnowsky To: zsh-users@sunsite.auc.dk In-reply-to: Bek Oberin's message of Thu, 22 Jul 1999 10:35:57 +1000 Subject: Re: Match on range Bek Oberin wrote: > For the completion of playcd, I want to match any number of a range > created like this: > 1-`cd-discid /dev/cdrom | cut -f2 -d' '` > but I can't get compctl to recognize it as a range. Can it even > -do- ranges? No, it can't. > Closest I've got is this: > compctl -k "(1-`cd-discid /dev/cdrom | cut -f2 -d' '`)" playcd > but that just matches on an array with one member, being "1-18" or > whatever. Not a range. > > Any ideas? If you don't have braceccl set, the cleanest solution would probably use a function: compctl -K comp_tracks playcd comp_tracks() { setopt localoptions braceccl reply=( {1-$(cd-discid /dev/cdrom | cut -f2 -d' ')} ) } If you have braceccl set, something like this should do the job: compctl -s '{1-$(cd-discid /dev/cdrom | cut -f2 -d' ')}' playcd Bye Sven -- Sven Wischnowsky wischnow@informatik.hu-berlin.de