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

Re: Is it possible to disable abbreviation of named directories?



Rudi C wrote on Thu, Apr 15, 2021 at 22:53:13 +0430:
> Per  14.7.2 Static named directories at
> http://zsh.sourceforge.net/Doc/Release/Expansion.html:
> 
> When the shell prints a path (e.g. when expanding %~ in prompts or when
> printing the directory stack), the path is checked to see if it has a named
> directory as its prefix. If so, then the prefix portion is replaced with a ‘
> ~’ followed by the name of the directory. The shorter of the two ways of
> referring to the directory is used, i.e. either the directory name or the
> full path.
> 
> 
> Is there a way to disable this? I like to see full paths when the shell
> prints things. I want the named dirs because they are easier to type, not
> because they are easier to read.

How are you hashing the directories (with «hash -d» or with
zsh_directory_name)?  How are you printing them?  E.g., for %~ in
prompts there's %/ to use instead.




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