From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2767 invoked from network); 8 Aug 2000 16:26:32 -0000 Received: from sunsite.auc.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 8 Aug 2000 16:26:32 -0000 Received: (qmail 4941 invoked by alias); 8 Aug 2000 16:25:57 -0000 Mailing-List: contact zsh-workers-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 12571 Received: (qmail 4934 invoked from network); 8 Aug 2000 16:25:56 -0000 Date: Tue, 8 Aug 2000 17:25:53 +0100 From: Adam Spiers To: zsh workers mailing list Subject: feature request: special completion of glob patterns Message-ID: <20000808172553.A26023@thelonious.new.ox.ac.uk> Reply-To: Adam Spiers Mail-Followup-To: zsh workers mailing list Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 1.0.1i X-Home-Page: http://www.new.ox.ac.uk/~adam/ X-OS: RedHat Linux This one's a little bit tricky to explain, and I suspect way too tricky to implement, but I'll mention it anyway. Say I want to diff two files in mirrored directory hierarchies: foo1/bar/baz.txt foo2/bar/baz.txt Ideally, I would like the following completion behaviour (assuming baz.txt is the only file in foo1/bar): $ diff -u foo[12]/bar/b $ diff -u foo[12]/bar/baz.txt i.e. zsh would do normal expansion on `foo[12]/bar/b', attempt completion on the first filename generated by the expansion, and then perform the same change to `foo[12]/bar/b' as it did to `foo1/bar/b' when it completed it to `foo1/bar/baz.txt', which in this case is adding `az.txt' to the end. Similar behaviour for $ diff -u foo_{one,two}/bar/b would be great too. Now I realise that to do this in full generality with the myriad of complex patterns zsh understands may well be impossible, but is it feasible to deal with simple cases like these?