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

Re: realpath(3), symlinks, '..' components, and the ':A' word modifier



On Jul 7,  2:00am, Daniel Shahaf wrote:
}
} To everyone who asked about compatibility: under the existing semantics
} of :A, "$foo" and "$foo:A" might denote different files.

But that implies that "$foo" and "$foo:a" might also denote different
files, so why is *that* a useful transformation?

} So, bottom line...  it seems the consensus on both lists is not to risk
} breaking compatibility here, and to add another :x modifier letter
} instead (as suggested by Roland here and by pws/Bart in workers/38798 et
} seq).

There's no letter to use that won't in some way be confuse-able with a
parameter expansion flag, so here are some ideas:

:L - mnemonic "link" - corresponds to "ls -L"
:R - mnemonic "real" - think of realpath()
:P - mnemonic "path" - the other half of realpath(), and also in a
                       certain way comparable to the (P) parameter
		       flag in that it interprets the path name as
		       a further path name and yields the file at
		       the other path



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