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

Re[2]: Bug with named dirs in prompt expansion



Phil Pennock hat am 26.07.2013 um 18:31 folgendes geschrieben:

> On 2013-07-26 at 20:58 +0200, Manuel Presnitz wrote:
> > is it just me, or is there a bug in the "%~" prompt expansion:
> 
> The idea of %~ is to find the shortest available name, for a condensed
> representation so as to concisely convey to the user where they are.

So, it's not a bug, but a feature -- I should have anticipated that.
Thanks for clarification!

For my apologies I want to quote the zshmisc manpage, which does
not mention that "shortening":

[ %~ 	As  %d  and  %/, but if the current working directory has a
[	named directory as its prefix, that part is replaced by a `~'
[	followed by the name of the directory.  If it starts with
[	$HOME, that part is replaced by a `~'.


Regards,
Manuel.




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