Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: $userdirs empty in non-interactive shells



On Fri, 8 Dec 2017 12:23:46 +0000
Stephane Chazelas <stephane.chazelas@xxxxxxxxx> 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.

Strictly you probably need to be able to turn off variable hashing as
directories entirely in POSIX mode.

pws



Messages sorted by: Reverse Date, Date, Thread, Author