zsh-workers
 help / color / mirror / code / Atom feed
* Handling of *ARGZERO options, for Zsh <= 5.3
@ 2018-01-02 10:17 Sebastian Gniazdowski
  2018-01-02 16:57 ` dana
                   ` (2 more replies)
  0 siblings, 3 replies; 9+ messages in thread
From: Sebastian Gniazdowski @ 2018-01-02 10:17 UTC (permalink / raw)
  To: zsh-workers

Hello,
I want to filter out $0 value if it contains path to Zsh binary:

% echo ${${0:#$ZSH_ARGZERO}:-${(%):-%N}}

Above works, but for Zsh 5.3 and above. Is it possible to do this with earlier Zshells?

The goal is to have choice to avoid %N, because it cannot be altered, and to solve problems caused by *ARGZERO options. Altering $0 would allow to do `eval "$(<script)"', which can be faster. I'm actually doing a bit more, details are on http://zdharma.org/Zsh-100-Commits-Club/Zsh-Plugin-Standard.html

--  
Sebastian Gniazdowski
psprint /at/ zdharma.org


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

end of thread, other threads:[~2018-01-04  2:02 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-01-02 10:17 Handling of *ARGZERO options, for Zsh <= 5.3 Sebastian Gniazdowski
2018-01-02 16:57 ` dana
2018-01-02 19:35   ` Bart Schaefer
     [not found]   ` <etPan.5a4bdf5d.6db8c70b.13d7@AirmailxGenerated.am>
2018-01-03  5:14     ` Sebastian Gniazdowski
2018-01-03  5:27       ` dana
2018-01-03  7:14         ` dana
2018-01-02 19:25 ` Eric Cook
2018-01-04  2:02   ` Bart Schaefer
     [not found] ` <etPan.5a4bbc41.719c42d6.13d7@AirmailxGenerated.am>
2018-01-03  5:08   ` Sebastian Gniazdowski

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