Zsh Mailing List Archive
Messages sorted by:
Re: :r modifier
- X-seq: zsh-workers 13273
- From: Alexandre Duret-Lutz <duret_g@xxxxxxxxxxxxx>
- To: "Andrej Borsenkow" <Andrej.Borsenkow@xxxxxxxxxxxxxx>
- Subject: Re: :r modifier
- Date: 14 Dec 2000 15:14:42 +0100
- Cc: <zsh-workers@xxxxxxxxxxxxxx>
- In-reply-to: "Andrej Borsenkow"'s message of "Thu, 14 Dec 2000 16:00:05 +0300"
- Mailing-list: contact zsh-workers-help@xxxxxxxxxxxxxx; run by ezmlm
- Organization: LRDE/EPITA http://www.lrde.epita.fr/
- References: <000901c065cd$c7b6c940$21c9ca95@xxxxxxxxxxxxxx>
- Sender: Alexandre Duret-Lutz <adl@xxxxxxxx>
>>> "Andrej" == Andrej Borsenkow <Andrej.Borsenkow@xxxxxxxxxxxxxx> writes:
Bart> :Do we need to teach :h/:t about the leading-double-slash
Bart> convention for some networked file systems?
>> I don't know, I never seen such file systems.
Andrej> May be, you have heard about one. It is called Windows
Andrej> and (sometimes) runs on x86 PC-compatible systems :-)
By the meantime I have been pointed to the Texinfo documentation
of Autoconf (>=2.49a) which reads as follow.
Not all hosts have `dirname', but it is reasonably easy to
dir=`expr "x$file" : 'x\(.*\)/[^/]*' \|
'.' : '.'
But there are a few subtilities, e.g., under UN*X, should `//1'
give `/'? Paul Eggert answers:
No, under some older flavors of Unix, leading `//' is a
special path name: it refers to a "super-root" and is used to
access other machines' files. Leading `///', `////', etc.
are equivalent to `/'; but leading `//' is special. I think
this tradition started with Apollo Domain/OS, an OS that is
still in use on some older hosts.
POSIX.2 allows but does not require the special treatment for
`//'. It says that the behavior of dirname on path names of
the form `//([^/]+/*)?' is implementation defined. In these
cases, GNU `dirname' returns `/', but it's more portable to
return `//' as this works even on those older flavors of Unix.
I have heard rumors that this special treatment of `//' may be
dropped in future versions of POSIX, but for now it's still
Andrej> I checked bash and it behaves the same as zsh.
Huh? You aren't speaking about :h here, are you?
Andrej> On Cygwin bash is just as ignorant about special Win32
Andrej> names as zsh is. It does not mean we should follow the
Andrej> suite - but, at least, we are in good company as it
Andrej> stand now :))
Messages sorted by: