Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Can this snippet be further improved?
- X-seq: zsh-workers 51999
- From: Sebastian Gniazdowski <sgniazdowski@xxxxxxxxx>
- To: Zsh hackers list <zsh-workers@xxxxxxx>
- Subject: Re: Can this snippet be further improved?
- Date: Fri, 28 Jul 2023 10:06:47 -0500
- Archived-at: <https://zsh.org/workers/51999>
- In-reply-to: <CAKc7PVCsq0nPN+7BFQRwktD1X+VzQSph5rwV5=_kfh3Z+SECqQ@mail.gmail.com>
- List-id: <zsh-workers.zsh.org>
- References: <CAKc7PVCsq0nPN+7BFQRwktD1X+VzQSph5rwV5=_kfh3Z+SECqQ@mail.gmail.com>
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