From: Sebastian Gniazdowski <sgniazdowski@gmail.com>
To: Zsh hackers list <zsh-workers@zsh.org>
Subject: Can this snippet be further improved?
Date: Fri, 28 Jul 2023 09:53:33 -0500 [thread overview]
Message-ID: <CAKc7PVCsq0nPN+7BFQRwktD1X+VzQSph5rwV5=_kfh3Z+SECqQ@mail.gmail.com> (raw)
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
next reply other threads:[~2023-07-28 9:54 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-07-28 14:53 Sebastian Gniazdowski [this message]
2023-07-28 15:06 ` Sebastian Gniazdowski
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='CAKc7PVCsq0nPN+7BFQRwktD1X+VzQSph5rwV5=_kfh3Z+SECqQ@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).