zsh-users
 help / color / mirror / code / Atom feed
From: Jean Chalard <jean.chalard@gmail.com>
To: zsh-users@sunsite.dk
Subject: Named directory pointing to a symbolic link
Date: Mon, 24 Oct 2005 13:04:48 +0900	[thread overview]
Message-ID: <fb6be96e0510232104t5eb8ceb9jdfa0f0310aa815c3@mail.gmail.com> (raw)

Hi zusers,

I've run into a behaviour I wasn't expecting with named directories on
FreeBSD. It's not like its a real inconvenience, but I thought I'd ask
anyway because I didn't find anything about this in the manual.

It seems to me like the 'www' variable (which ought to be unset when I
start the shell, it's not like it should be a special variable as far
as I understand) has a strange behaviour : it points on /nonexistent
when used as a named directory, and any attempt I do to have it point
elsewhere with the export builtin doesn't work when the variable is
used as a named directory, though it works when invoked as hash -d.
Other variable names don't seem to behave that way.

The script you see below is executed on a machine on which I installed
zsh in my user account, but I don't think it could be relevant because
I can reproduce it on another FreeBSD where zsh is installed the
vanilla way and where I don't have any configuration files. This
doesn't happen on the linux box I have my hands on at the moment,
where the www variable behaves exactly the same way as the foo
variable. It happens that I can't test on other systems I usually have
access to at the moment, sorry :/

To clarify what I mean :

> zsh/bin/zsh -f
mobdev% zsh/bin/zsh --version
zsh 4.2.5 (i386-unknown-freebsd4.11)
mobdev% uname -a
FreeBSD mobdev 4.11-STABLE FreeBSD 4.11-STABLE #1: Tue Feb 22 05:55:23 JST 2005
    root@:/usr/src/sys/compile/WDB  i386
mobdev% autoload -U parameters
mobdev% echo $nameddirs

mobdev% echo ~foo
zsh: no such user or named directory: foo
mobdev% echo $www

mobdev% echo ~www
/nonexistent
mobdev% export www=/usr
mobdev% echo $www
/usr
mobdev% echo ~www
/nonexistent
mobdev% hash -d www=/usr
mobdev% echo $www
/usr
mobdev% echo ~www
/usr
mobdev%

Does anyone have an idea of why this variable behaves that way ?

--
J
"Toi, je te trouve pas la même tête que sur la page précédente" -- Wakamiya

             reply	other threads:[~2005-10-24  4:08 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-10-24  4:04 Jean Chalard [this message]
2005-10-24  8:21 ` DervishD
2005-10-24  8:37   ` Jean Chalard
2005-10-24  9:08 ` Peter Stephenson
2005-10-24  9:18   ` Jean Chalard
2005-10-24 14:48 ` Bart Schaefer
2005-10-24 22:36   ` Lloyd Zusman
2005-10-25  2:51   ` Jean Chalard

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=fb6be96e0510232104t5eb8ceb9jdfa0f0310aa815c3@mail.gmail.com \
    --to=jean.chalard@gmail.com \
    --cc=zsh-users@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).