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

Re: Next release (5.3)



On Jul 20,  3:05pm, Vincent Lefevre wrote:
} 
} But it does not say how ".." is resolved. Using the realpath system
} call is a way (the only correct one) to resolve "..".

Well, no, that's not true.  Using something that implements the same
algorithm as realpath is the only correct way to resolve a possible
chain of several relative and symbolic links.

But :a never said that it resolves symbolic links.  It says it "turns
a file name into an absolute path".  The doc probably should have said
"REMOVES any use of `..'" rather than "resolves", but there's no mention
of symbolic links at all.

You could argue that opendir("..") is the only correct way to "resolve"
".." but zsh has NEVER done that with "cd" except when CHASE_DOTS.  As
has become apparent, PWS wanted :a to predict the result of "cd", not
to resolve symbolic links.

And :A starts out with "as :a" before it gets to the part about links.



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