From: Rob Windsor <windsor@warthog.com>
To: zsh-users@sunsite.auc.dk
Subject: Re: cd, pwd and symlinks
Date: Tue, 28 Sep 1999 20:11:34 -0500 [thread overview]
Message-ID: <199909290111.UAA02510@warthog.com> (raw)
In-Reply-To: Your message of "27 Sep 1999 19:05:02 EDT." <5lemfkez1d.fsf@tequila.cs.yale.edu>
Verily did "Stefan Monnier" write:
>>> youkaidi ~ % mkdir foo
>>> youkaidi ~ % mkdir foo/bar
>>> youkaidi ~ % md bar
>>> youkaidi ~ % cd bar
>>> youkaidi ~/bar % ln -s ../foo/bar foo
>>> youkaidi ~/bar % cd foo
>>> youkaidi ~/bar/foo % ls ..
>>> bar
*>> youkaidi ~/bar/foo % pwd
*>> /udd/canon/foo/bar
*>> youkaidi ~/bar/foo % /bin/pwd
*>> /udd/canon/foo/bar
*>> youkaidi ~/bar/foo % cd ..
*>> youkaidi ~/bar %
>> Put `setopt chaselinks' or `setopt chasedots' in your .zshrc. From
>> the info pages:
> I must say I don't like the names and defaults. The names give the
> impression that chasing links is a very unusual feature while it's the
> normal unix behavior.
That depends wholly upon the shell. C-shell variants do it one way, sh
sorta does it like zsh (the items marked with a `*' above are like csh,
but because sh doesn't appear to have a builtin cd(1) or pwd(1)). Zsh
does it (by default?) the same way that ksh does.
The use of symlinks pointing to subdirs has long been flagged as A Bad
Idea due to the handling of `..', so "ymmv" when you choose to use them.
> But apart from that, I'm more often annoyed by `pwd' not checking the
> value it returns:
> ~/tmp-0% mkdir foo
> ~/tmp-0% cd foo
> tmp/foo-0% mv ../foo ../bar
> tmp/foo-0% pwd
> /home/monnier/tmp/foo
> tmp/foo-0%
> This is with 3.0.6,
And ksh does the same thing. Again, sh(1) doesn't do this because it
doesn't have a builtin pwd(1).
I'm surely not complaining about how zsh handles either of these behaviors,
I prefer a ksh-on-steriods look and smell for a shell.
-- Rob
----------------------------------------
Internet: windsor@warthog.com __o
Life: Rob@Carrollton.Texas.USA.Earth _`\<,_
(_)/ (_)
The weather is here, wish you were beautiful.
prev parent reply other threads:[~1999-09-29 1:11 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
1999-09-27 8:51 Hubert Canon
1999-09-27 13:02 ` Adam Spiers
1999-09-27 13:34 ` Hubert Canon
1999-09-27 13:42 ` Adam Spiers
1999-09-30 19:05 ` Adam Spiers
1999-09-27 23:05 ` Stefan Monnier
1999-09-28 0:11 ` Bart Schaefer
1999-09-28 0:47 ` Stefan Monnier
1999-09-29 1:11 ` Rob Windsor [this message]
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=199909290111.UAA02510@warthog.com \
--to=windsor@warthog.com \
--cc=zsh-users@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).