From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22916 invoked from network); 13 Dec 2000 12:57:14 -0000 Received: from sunsite.dk (HELO sunsite.auc.dk) (130.225.51.30) by ns1.primenet.com.au with SMTP; 13 Dec 2000 12:57:14 -0000 Received: (qmail 4542 invoked by alias); 13 Dec 2000 12:57:07 -0000 Mailing-List: contact zsh-workers-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 13254 Received: (qmail 4524 invoked from network); 13 Dec 2000 12:57:05 -0000 To: "Bart Schaefer" Cc: zsh-workers@sunsite.auc.dk Subject: Re: :r modifier References: <1001213041501.ZM11124@candle.brasslantern.com> From: Alexandre Duret-Lutz X-Home-Page: http://www.epita.fr/~duret_g/ X-Attribution: adl Organization: LRDE/EPITA http://www.lrde.epita.fr/ Date: 13 Dec 2000 14:03:59 +0100 In-Reply-To: "Bart Schaefer"'s message of "Wed, 13 Dec 2000 04:15:01 +0000" Message-ID: User-Agent: Gnus/5.0807 (Gnus v5.8.7) Emacs/20.7 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Sender: Alexandre Duret-Lutz >>> "Bart" == Bart Schaefer writes: [...] Bart> Hrm. Well, it's correct in so far as it goes; the :r and Bart> :e modifiers appear to assume that they're already Bart> working on the result of :t, and pay no attention at all Bart> to slash characters; they just find the rightmost '.' and Bart> split on it. They've worked this way for as long as zsh Bart> has existed, AFAICT. I believe this weakness makes :r error-prone (who *needs* to ignore slashes?). Now, if I want the slash-aware equivalant for $MAIL:r, I have to write something like: echo $MAIL:h/$MAIL:t:r (this assumes that the dirname is non-empty). Bart> Tcsh behaves the same, so I don't expect we'll be Bart> changing it any time soon. Oh, I didn't know this was a tcsh heritage (this can explain lots of things :o)). Anyway, my copy of tcsh does behave as *I* expect on these modifiers (i.e. unlike Zsh). See: % tcsh -f > echo $MAIL /home/adl/.procmail/spool/Inbox > echo $MAIL:r $MAIL:e /home/adl/.procmail/spool/Inbox > echo $version tcsh 6.09.03 (Astron) 2000-07-15 (i386-intel-linux) options 8b,nls,bye,al,ng,rh,nd,color -- Alexandre Duret-Lutz