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

Re: Can this snippet be further improved?



For example, would be :P instead of :A better?

On Fri, 28 Jul 2023 at 09:53, Sebastian Gniazdowski
<sgniazdowski@xxxxxxxxx> wrote:
>
> I'm preparing update to zsh plugin standard. It's about getting the
> path to the sourced (….plugin.zsh) script. The current version is:
>
>     0=${${ZERO:-${(%):-%x}}:A}
>
> I wonder if it could be improved? The current version:
> - favors ZERO,
> - falls back to %x if ZERO is empty,
> - makes the path absolute,
> - resolved symlinks and ,,./ components.
>
> Is there a bug or improvement that's possible?
>
> --
> Best regards,
> Sebastian Gniazdowski



-- 
Best regards,
Sebastian Gniazdowski




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