From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13587 invoked from network); 14 Dec 2000 14:11:19 -0000 Received: from sunsite.dk (HELO sunsite.auc.dk) (130.225.51.30) by ns1.primenet.com.au with SMTP; 14 Dec 2000 14:11:19 -0000 Received: (qmail 20411 invoked by alias); 14 Dec 2000 14:11:12 -0000 Mailing-List: contact zsh-workers-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 13273 Received: (qmail 20401 invoked from network); 14 Dec 2000 14:11:10 -0000 To: "Andrej Borsenkow" Cc: Subject: Re: :r modifier References: <000901c065cd$c7b6c940$21c9ca95@mow.siemens.ru> 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: 14 Dec 2000 15:14:42 +0100 In-Reply-To: "Andrej Borsenkow"'s message of "Thu, 14 Dec 2000 16:00:05 +0300" 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 >>> "Andrej" == Andrej Borsenkow 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 :-) :o) By the meantime I have been pointed to the Texinfo documentation of Autoconf (>=2.49a) which reads as follow. `dirname' Not all hosts have `dirname', but it is reasonably easy to emulate, e.g.: 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 the standard. 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 :)) -- Alexandre Duret-Lutz