From: Sebastian Gniazdowski <sgniazdowski@gmail.com>
To: Zsh hackers list <zsh-workers@zsh.org>
Subject: Re: Can this snippet be further improved?
Date: Fri, 28 Jul 2023 10:06:47 -0500 [thread overview]
Message-ID: <CAKc7PVD_cJ15tdkaK60yEo_T9nMK34X12vqNEg8_gAMxNNPeCA@mail.gmail.com> (raw)
In-Reply-To: <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@gmail.com> 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
next prev parent reply other threads:[~2023-07-28 10:07 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-07-28 14:53 Sebastian Gniazdowski
2023-07-28 15:06 ` Sebastian Gniazdowski [this message]
2023-07-28 21:37 ` Bart Schaefer
2023-07-29 3:09 ` Sebastian Gniazdowski
2023-07-28 22:17 ` Bart Schaefer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CAKc7PVD_cJ15tdkaK60yEo_T9nMK34X12vqNEg8_gAMxNNPeCA@mail.gmail.com \
--to=sgniazdowski@gmail.com \
--cc=zsh-workers@zsh.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).