From: Peter Stephenson <pws@csr.com>
To: zsh-workers@sunsite.dk (Zsh hackers list)
Subject: Re: PATCH: Re: :r modifier
Date: Mon, 19 Feb 2001 10:32:14 +0000 [thread overview]
Message-ID: <Tc0a8890c51d2ae58ca@mailsweeper01.cambridgesiliconradio.com> (raw)
In-Reply-To: Your message of "15 Dec 2000 12:53:30 +0100." <mvbelz96gud.fsf@phobos.lrde.epita.fr>
> >>> "adl" == Alexandre Duret-Lutz <duret_g@lrde.epita.fr> writes:
>
> Here are the results on some error-prone inputs:
>
> % for x in a.b//c //e ///g.h /i/j/k/ l.m ..
> for> print "$x\t root=$x:r\text=$x:e,\thead=$x:h,\ttail=$x:t"
> a.b//c root=a.b//c ext=, head=a.b, tail=c
> //e root=//e ext=, head=//, tail=e
> ///g.h root=///g ext=h, head=/, tail=g.h
> /i/j/k/ root=/i/j/k/ ext=, head=/i/j, tail=k
> l.m root=l ext=m, head=., tail=l.m
> .. root=. ext=, head=., tail=..
>
> and unpatched zsh:
>
> % for x in a.b//c //e ///g.h /i/j/k/ l.m ..
> for> print "$x\t root=$x:r\text=$x:e,\thead=$x:h,\ttail=$x:t"
> a.b//c root=a ext=b//c, head=a.b/, tail=c
> //e root=//e ext=//e, head=/, tail=e
> ///g.h root=///g ext=h, head=//, tail=g.h
> /i/j/k/ root=/i/j/k/ ext=/i/j/k/, head=/i/j/k, tail=
> l.m root=l ext=m, head=l.m, tail=l.m
> .. root=. ext=, head=.., tail=..
I've just committed Alexandre's patch, with the effects shown. Watch out
for unexpected results from colon modifiers. With a bit of luck, in most
places where they are used the new behaviour should actually reduce
unexpected results. Andrej: note that this uses `\\' as well as `/' for
paths in Cygwin.
--
Peter Stephenson <pws@csr.com> Software Engineer
Cambridge Silicon Radio, Unit 300, Science Park, Milton Road,
Cambridge, CB4 0XL, UK Tel: +44 (0)1223 392070
prev parent reply other threads:[~2001-02-19 10:32 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2000-12-12 16:57 Alexandre Duret-Lutz
2000-12-13 4:15 ` Bart Schaefer
2000-12-13 13:03 ` Alexandre Duret-Lutz
2000-12-13 17:21 ` Bart Schaefer
2000-12-13 19:21 ` Alexandre Duret-Lutz
2000-12-13 23:10 ` Thomas Köhler
2000-12-14 13:00 ` Andrej Borsenkow
2000-12-14 14:14 ` Alexandre Duret-Lutz
2000-12-14 14:43 ` Andrej Borsenkow
2000-12-14 18:18 ` PATCH: " Alexandre Duret-Lutz
2000-12-14 23:52 ` Geoff Wing
2000-12-15 10:22 ` Alexandre Duret-Lutz
2000-12-15 10:58 ` Geoff Wing
2000-12-15 10:27 ` Peter Stephenson
2000-12-15 21:30 ` Thomas Köhler
2000-12-15 11:53 ` Alexandre Duret-Lutz
2001-02-14 18:34 ` Alexandre Duret-Lutz
2001-02-14 18:40 ` Peter Stephenson
2001-02-14 19:44 ` Bart Schaefer
2001-02-19 10:32 ` Peter Stephenson [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Tc0a8890c51d2ae58ca@mailsweeper01.cambridgesiliconradio.com \
--to=pws@csr.com \
--cc=zsh-workers@sunsite.dk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).