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

Re: Bug with :P modifier when current directory is the root



Bart wrote:
> I can't think of any case [*] where the :P modifier should add a double
> leading slash.
>
> [*] Except on weird OSs where you refer to auto-mount points with //host/
> but that's definitely not the case here.

Preserving of two initial slashes is, I think, in the spec and has long
been reserved to allow "weird OSs" to do odd stuff like specifying
remote hosts. That would imply that :P should preserve two slashes while
three or more should be squeezed down to one. See:
https://jvns.ca/blog/2017/02/08/weird-unix-things-cd/

Oliver



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