From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3198 invoked from network); 22 Jan 2001 12:17:45 -0000 Received: from sunsite.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 22 Jan 2001 12:17:45 -0000 Received: (qmail 3806 invoked by alias); 22 Jan 2001 12:17:24 -0000 Mailing-List: contact zsh-users-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 3590 Received: (qmail 3791 invoked from network); 22 Jan 2001 12:17:24 -0000 Date: Mon, 22 Jan 2001 13:17:20 +0100 (MET) Message-Id: <200101221217.NAA06157@beta.informatik.hu-berlin.de> From: Sven Wischnowsky To: zsh-users@sunsite.auc.dk In-reply-to: Tarmo =?ISO-8859-1?Q?J=E4rvi?='s message of Sat, 20 Jan 2001 16:26:42 +0000 (GMT+00:00) Subject: Re: Completion once again.. Tarmo Järvi wrote: > Hello list, > > and my apologies if this question has been asked several times but I couldn't find answer anywhere. > > Anyway, here's my question: I have in ~/.zshrc: > > compctl -g '*.(tar|t[ag]z|tz|tar.gz|tar.Z|tarZ|tar.bz2)' + -g '*(-/)' {,ls,un,g,gnu}tar > > and in /tmp: > > foo.tar > bar/ > bar/snafu.tar > > if I 'cd /tmp' and type tar I get: > > tar foo.tar > > How do I get menu with all directories files matching definitions above? I've tried numerous tricks but I couldn't made it. If you only want to see the matching files together with the directories, use only one `-g' and apend the `*(-/)' to the `*.(tar|...)' with a space betwen them. If you want to see `foo.tar' and `bar/snafu.tar' as completions at the same time, you would have to write a completion function and make it be called `compctl -K'. There you could use `**/*.(tar|...)'. But I doubt that you really want that, because of the possibility of accidentally making it scan great parts of your directory structure. Or maybe I didn't really understand what you want? Bye Sven -- Sven Wischnowsky wischnow@informatik.hu-berlin.de