From: Stephane Chazelas <stephane.chazelas@gmail.com>
To: Peter Stephenson <p.stephenson@samsung.com>
Cc: Zsh hackers list <zsh-workers@zsh.org>
Subject: Re: $userdirs empty in non-interactive shells
Date: Fri, 8 Dec 2017 19:46:52 +0000 [thread overview]
Message-ID: <20171208194652.GB28235@chaz.gmail.com> (raw)
In-Reply-To: <20171208123150.576c59b6@pwslap01u.europe.root.pri>
2017-12-08 12:31:50 +0000, Peter Stephenson:
> On Fri, 8 Dec 2017 12:23:46 +0000
> Stephane Chazelas <stephane.chazelas@gmail.com> wrote:
> > BTW, I just realised that named dirs in variables took precedence
> > over user home dirs:
> >
> > $ zsh -fc 'cd -P -- ~bin && pwd'
> > /bin
> > $ bin=/tmp zsh -fc 'cd -P -- ~bin && pwd'
> > /tmp
> >
> > Is that intentional?
>
> Yes, it allows you to override locations associated with users without
> jumping through lots of hoops.
[...]
Ah OK.
What would be a typical use case?
Is that the reason why named dirs were introduced in the first place?
--
Stephane
next prev parent reply other threads:[~2017-12-08 19:47 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-12-07 11:29 Stephane Chazelas
2017-12-07 13:43 ` Stephane Chazelas
2017-12-08 12:23 ` Stephane Chazelas
2017-12-08 12:31 ` Peter Stephenson
2017-12-08 19:46 ` Stephane Chazelas [this message]
2018-06-17 14:14 ` Stephane Chazelas
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=20171208194652.GB28235@chaz.gmail.com \
--to=stephane.chazelas@gmail.com \
--cc=p.stephenson@samsung.com \
--cc=zsh-workers@zsh.org \
/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).