From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7320 invoked from network); 19 Nov 2001 06:47:43 -0000 Received: from sunsite.dk (130.225.247.90) by ns1.primenet.com.au with SMTP; 19 Nov 2001 06:47:43 -0000 Received: (qmail 419 invoked by alias); 19 Nov 2001 06:47:20 -0000 Mailing-List: contact zsh-users-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 4482 Received: (qmail 406 invoked from network); 19 Nov 2001 06:47:17 -0000 Sender: harsh@wiprom2mx2.wipro.com Message-ID: <3BF8AC8D.478A8D11@wipro.com> Date: Mon, 19 Nov 2001 12:24:05 +0530 From: Harshad R Joglekar Organization: Wipro X-Mailer: Mozilla 4.78 [en] (X11; U; Linux 2.2.13 i686) X-Accept-Language: en MIME-Version: 1.0 To: zsh-users@sunsite.dk Subject: cvs completion / intelligent open Content-Type: multipart/mixed; boundary="------------InterScan_NT_MIME_Boundary" --------------InterScan_NT_MIME_Boundary Content-Type: multipart/alternative; boundary="------------773CF2BD00F4AAF2B86742F6" --------------773CF2BD00F4AAF2B86742F6 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Hi all, I have been using zsh for quite some time now, and the completion system is superb. There are some minor nits though: "cvs add" should complete not only files that are not currently in cvs, but also files that have been locally removed (but not yet committed). I also want to implement a semantic for opening / editing files, that is independent of the file type. That is, if I say "open a.html" it should open my preferred browser, and if I say "edit a.html" it could open my preferred editor. Is such a function already implemented? regards, Harshad -- Harshad RJ PS. I am not subsribed to the list, so please cc your replies. --------------773CF2BD00F4AAF2B86742F6 Content-Type: text/html; charset=us-ascii Content-Transfer-Encoding: 7bit Hi all,
I have been using zsh for quite some time now, and the completion system is superb. There are some minor nits though:
"cvs add" should complete not only files that are not currently in cvs, but also files that have been locally removed (but not yet committed).

I also want to implement a semantic for opening / editing files, that is independent of the file type. That is, if I say "open
a.html" it should open my preferred browser, and if I say "edit a.html" it could open my preferred editor. Is such a function
already implemented?

regards,
Harshad

-- 
Harshad RJ
PS. I am not subsribed to the list, so please cc your replies. --------------773CF2BD00F4AAF2B86742F6-- --------------InterScan_NT_MIME_Boundary Content-Type: text/plain; name="InterScan_Disclaimer.txt" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="InterScan_Disclaimer.txt" ------------------------------------------------------------------------------------------------------------------------- Information transmitted by this E-MAIL is proprietary to Wipro and/or its Customers and is intended for use only by the individual or entity to which it is addressed, and may contain information that is privileged, confidential or exempt from disclosure under applicable law. If you are not the intended recipient or it appears that this mail has been forwarded to you without proper authority, you are notified that any use or dissemination of this information in any manner is strictly prohibited. In such cases, please notify us immediately at mailto:mailadmin@wipro.com and delete this mail from your records. ---------------------------------------------------------------------------------------------------------------------- --------------InterScan_NT_MIME_Boundary-- From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21737 invoked from network); 19 Nov 2001 17:31:23 -0000 Received: from sunsite.dk (130.225.247.90) by ns1.primenet.com.au with SMTP; 19 Nov 2001 17:31:23 -0000 Received: (qmail 10382 invoked by alias); 19 Nov 2001 17:31:01 -0000 Mailing-List: contact zsh-users-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 4483 Received: (qmail 10352 invoked from network); 19 Nov 2001 17:30:55 -0000 From: Bart Schaefer Message-Id: <1011119173018.ZM28041@candle.brasslantern.com> Date: Mon, 19 Nov 2001 17:30:16 +0000 In-Reply-To: <3BF8AC8D.478A8D11@wipro.com> Comments: In reply to Harshad R Joglekar "cvs completion / intelligent open" (Nov 19, 12:24pm) References: <3BF8AC8D.478A8D11@wipro.com> X-Mailer: Z-Mail (5.0.0 30July97) To: Harshad R Joglekar , zsh-users@sunsite.dk Subject: Re: cvs completion / intelligent open MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii On Nov 19, 12:24pm, Harshad R Joglekar wrote: } } "cvs add" should complete not only files that are not currently in cvs, } but also files that have been locally removed (but not yet committed). These files are included in CVS/Entries in the form /filename/-version/date//tag where the `-' before the version number is what marks them removed. To show these files for "cvs add", the pattern used to set the `omitpats' array, in _cvs_nonentried_files() in Completion/Command/Unix/_cvs, has to be modified to leave out lines matching the above format. I think this should do it: Index: Completion/Unix/Command/_cvs =================================================================== RCS file: /extra/cvsroot/zsh/zsh-4.0/Completion/Unix/Command/_cvs,v retrieving revision 1.7 diff -c -r1.7 _cvs --- Completion/Unix/Command/_cvs 2001/09/05 15:22:29 1.7 +++ Completion/Unix/Command/_cvs 2001/11/19 17:21:31 @@ -959,7 +959,7 @@ realdir=${(e)~linedir} [[ -f "$realdir"CVS/Entries ]] && { omitpats=( - ${${${${(M)${(f)"$(<"$realdir"CVS/Entries)"}:#(D|)/*}#(D|)/}%%/*}//(#m)[][*?()<|^~#\\]/\\$MATCH} + ${${${${(M)${${(f)"$(<"$realdir"CVS/Entries)"}:#/*/-*}:#(D|)/*}#(D|)/}%%/*}//(#m)[][*?()<|^~#\\]/\\$MATCH} $_cvs_ignore_default ${=cvsignore} ) However, I'm not certain it's correct to treat removed files as nonentries in all other cases, so it may really be necessary to create an entire other function for this. Any other zsh-workers have an opinion? (Continue that part of this thread on zsh-workers, please.) } I also want to implement a semantic for opening / editing files, that } is independent of the file type. That is, if I say "open a.html" it } should open my preferred browser, and if I say "edit a.html" it could } open my preferred editor. Is such a function already implemented? Look at Functions/Example/zless for something similar. -- Bart Schaefer Brass Lantern Enterprises http://www.well.com/user/barts http://www.brasslantern.com Zsh: http://www.zsh.org | PHPerl Project: http://phperl.sourceforge.net