zsh-workers
 help / color / mirror / code / Atom feed
* Can this snippet be further improved?
@ 2023-07-28 14:53 Sebastian Gniazdowski
  2023-07-28 15:06 ` Sebastian Gniazdowski
  0 siblings, 1 reply; 5+ messages in thread
From: Sebastian Gniazdowski @ 2023-07-28 14:53 UTC (permalink / raw)
  To: Zsh hackers list

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


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2023-07-28 22:17 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-07-28 14:53 Can this snippet be further improved? Sebastian Gniazdowski
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

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).