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

Re: Tilde (%~) prompt expansion inconsistent with named directories?



On 2008-07-21 at 19:18 -0400, dackz wrote:
> I think what I really meant to say is that I think it should be  
> consistent. I.e., it should either never do it, or always do it  
> (perhaps through a setting/option).
> 
> At least in my case I had been using my own custom prompt function  

In your init function for setting the prompt:
  zmodload -i zsh/parameter
  print ${(k)userdirs} >/dev/null

>             and is there a way to disable named directory expansion  
> for %~? Though I suppose I could just as well use "${PWD/$HOME/~}" in  
> the latter case.

I think ${PWD/$HOME/~} is your best bet.

-Phil



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