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

Re: Not finding named directories in subshells



On Thu, Dec 13, 2007 at 06:01:03PM +0100, Mikael Magnusson wrote:
> {17:56:22|~}% cd ~pastebot/html
> {17:56:23|~pastebot/html}% zsh
> {17:56:25|/home/pastebot/html}% cd .
> {17:56:27|/home/pastebot/html}% cd $PWD
> {17:56:29|/home/pastebot/html}% cd ..
> {17:56:31|/home/pastebot}% cd ../pastebot
> {17:56:33|/home/pastebot}% cd /home/pastebot
> {17:56:36|/home/pastebot}% cd ~pastebot
> {17:56:36|~pastebot}%
> 
> Putting hash -d -f in .zshenv fixes it, is this expected behaviour?
[...]

See the description of the auto_name_dirs option in the manual

AUTO_NAME_DIRS
     Any parameter that is set to the absolute name of a directory
     immediately becomes a name for that directory, that will be used
     by the `%~' and related prompt sequences, and will be available
     when completion is performed on a word starting with `~'.
     (Otherwise, the parameter must be used in the form `~PARAM' first.)

Cheers,
Stephane



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