zsh-workers
 help / color / mirror / code / Atom feed
From: "Andrej Borsenkow" <Andrej.Borsenkow@mow.siemens.ru>
To: "Alexandre Duret-Lutz" <duret_g@lrde.epita.fr>
Cc: <zsh-workers@sunsite.auc.dk>
Subject: RE: :r modifier
Date: Thu, 14 Dec 2000 17:43:11 +0300	[thread overview]
Message-ID: <000a01c065dc$2ea4d9e0$21c9ca95@mow.siemens.ru> (raw)
In-Reply-To: <mvbae9z6qel.fsf@phobos.lrde.epita.fr>

>
>           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.
>

I really liked Apollo Domain/OS. It was nice system, with transparent
networking, remote execution and file system. You could start program on a
second system with input from local (your own) and let output be created on a
third.

>           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.
>

Yep, POSIX is very careful to not require changing of existing behaviour. It
prefers to leave most things as implementation defined.

>
>  Andrej> I checked bash and it behaves the same as zsh.
>
> Huh?  You aren't speaking about :h here, are you?
>

I am speaking about :r and :e. What so special about :h? Here is bash:

mw1g017@MW1G17C ~
$ ls  /bar/bar.baz/baz
ls: /bar/bar.baz/baz: No such file or directory

mw1g017@MW1G17C ~
$ ls !!:1:r
ls /bar/bar
ls: /bar/bar: No such file or directory

mw1g017@MW1G17C ~
$ ls  /bar/bar.baz/baz
ls: /bar/bar.baz/baz: No such file or directory

mw1g017@MW1G17C ~
$ ls !!:1:e
ls .baz/baz
ls: .baz/baz: No such file or directory

Hmm ... with :e modifier bash preserves dot and zsh not. csh here behaves as
zsh. Incidentally, csh here does treat strings like Alexander would like it:

itsrm2% !21
echo /bar/bar.baz/baz
/bar/bar.baz/baz
itsrm2% echo !!:1:r
echo /bar/bar.baz/baz
/bar/bar.baz/baz
itsrm2% echo !!:1:e
echo

-andrej


  reply	other threads:[~2000-12-14 14:43 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 [this message]
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

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='000a01c065dc$2ea4d9e0$21c9ca95@mow.siemens.ru' \
    --to=andrej.borsenkow@mow.siemens.ru \
    --cc=duret_g@lrde.epita.fr \
    --cc=zsh-workers@sunsite.auc.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).