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

Re: Bug#494098: zsh: Prompt expansion of %~ seems broken.



On Mon, Aug 11, 2008 at 09:19:37AM +0100, Magnus Therning wrote:
> >> Expansion of %~ seems to have been broken.  This is the behaviour I see:
> >>
> >>   ~: print $PS1
> >>   %~:
> >>   ~: print -P %~
> >>   ~
> >>   ~: cd Desktop
> >>   /home/magnus/Desktop: print -P %~
> >>   /home/magnus/Desktop
> >>   /home/magnus/Desktop: cd ..
> >>   /home/magnus: print -P %~
> >>   /home/magnus
> >
> > I can't reproduce this.  Are there symlinks involved?  What is your home
> > directory set to?  What happens when you cd to ~magnus ?
> 
> No, there are no symlinks involved.  $HOME is /home/magnus, which
> matches what's in /etc/passwd:
> 
> ~ grep magnus /etc/passwd
> magnus:x:1000:1000:Magnus Therning,,,:/home/magnus/:/bin/zsh
> 
> I'm using LVM2 to host my /home:
> 
> ~ grep magnus /etc/passwd
> magnus:x:1000:1000:Magnus Therning,,,:/home/magnus/:/bin/zsh
> 
> And to answer your last question:
> 
> ~ cd ~magnus
> ~magnus print -P '%~'
> ~magnus cd Desktop
> ~magnus/Desktop print -P '%~'
> 
> I'm sharing the ZSH configuration between a few machines, none of the
> others show this behaviour.

Beats me.  Anyone have ideas?



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