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

Re: cd =5 changed semantics?



[beta14]
>    k@anna:/tmp% cd =2
>    zsh: 2 not found
[beta13]
>    anna% cd =2
>    anna% pwd
>    /tmp

The semantics, as you suggest, have changed.  Equals substitution now
only does pathname and alias substitution.  The directory stack
substitution is now done with ~.  See zshexpn(1), specifically the
section headed "FILENAME EXPANSION".

This change was actually discussed and approved last year, but wasn't
implemented until recently.  The rationale is that this makes it
possible to use = to generate the pathname of a command beginning with
a digit (this *is* an issue), and it makes all the expansions to
directory names use ~.

-zefram




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