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

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



On Aug 11,  1:31pm, Clint Adams wrote:
} Subject: Re: Bug#494098: zsh: Prompt expansion of %~ seems broken.
}
} On Mon, Aug 11, 2008 at 09:19:37AM +0100, Magnus Therning wrote:
} > >>
} > >>   ~: cd Desktop
} > >>   /home/magnus/Desktop: print -P %~
} > >>   /home/magnus/Desktop
} > >>   /home/magnus/Desktop: cd ..
} > >>   /home/magnus: print -P %~
} > >>   /home/magnus
} 
} Beats me.  Anyone have ideas?

It's the trailing slash in the value of the home directory in passwd:

> ~ grep magnus /etc/passwd
> magnus:x:1000:1000:Magnus Therning,,,:/home/magnus/:/bin/zsh

[[ /home/magnus/ != /home/magnus ]] so $HOME is not being recognized as
a prefix of any subdirectory.



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