zsh-users
 help / color / mirror / code / Atom feed
* Named directory pointing to a symbolic link
@ 2005-10-24  4:04 Jean Chalard
  2005-10-24  8:21 ` DervishD
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Jean Chalard @ 2005-10-24  4:04 UTC (permalink / raw)
  To: zsh-users

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

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2005-10-25  2:51 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-10-24  4:04 Named directory pointing to a symbolic link Jean Chalard
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

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