Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Handling of *ARGZERO options, for Zsh <= 5.3
- X-seq: zsh-workers 42198
- From: dana <dana@xxxxxxx>
- To: Sebastian Gniazdowski <psprint@xxxxxxxxxxx>
- Subject: Re: Handling of *ARGZERO options, for Zsh <= 5.3
- Date: Tue, 2 Jan 2018 10:57:26 -0600
- Cc: zsh-workers@xxxxxxx
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=dana-is.20150623.gappssmtp.com; s=20150623; h=mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=j1+IEoa3K0CSecQDUlE/9xwW1CtHQfK1Nije60j/EhE=; b=psvI0CEygzXPaKKflLJOQgZjLGRz1Si5nJgjEkszpsij6UX3e2dSmX1UbBSeqWoUfE zeoBcZMXaHkZqlgRbGG8+wZtXg1YHL5DRw5aR82pxjrXC4a3gTccoZgIwb3vKczQCUZF SDI0fUkQs0gjdTNfloaRdnYQWw6t5JxliwsJ6zDdOk77dti+F9/9p4dlAJyatL7Es5Qk j9/kKVxOwmm3jroufsrVP4bV7ILUbgzUSbHdKWuryPFGgCskwNUl4Kz4EatnPwNcHFjA hSCM6OsPU1Z6PxPo58va8g4Uex/jORzNn9CLmMHzvkp5Lqr552Qa9mgP09guTYvm6A9X Sf6A==
- In-reply-to: <etPan.5a4b5c52.d9c84bc.13d7@zdharma.org>
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- List-unsubscribe: <mailto:zsh-workers-unsubscribe@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
- References: <etPan.5a4b5c52.d9c84bc.13d7@zdharma.org>
On 2 Jan 2018, at 04:17, Sebastian Gniazdowski <psprint@xxxxxxxxxxx> wrote:
>I want to filter out $0 value if it contains path to Zsh binary:
A lot of the time you won't have the path to the zsh binary; it will often just
be the base name:
% print $ZSH_ARGZERO
zsh
Even when you have a path you might need to deal with symlinks, &c. On mine
sometimes i'll have /usr/local/bin/zsh and other times it'll have been resolved
to /usr/local/Cellar/zsh/x.y.z/bin/zsh.
On 2 Jan 2018, at 04:17, Sebastian Gniazdowski <psprint@xxxxxxxxxxx> wrote:
>Above works, but for Zsh 5.3 and above. Is it possible to do this with earlier Zshells?
If the problem is ZSH_ARGZERO, shouldn't this work in like 5.0+?
() {
setopt local_options posix_argzero
MY_ARGZERO=$0
}
dana
Messages sorted by:
Reverse Date,
Date,
Thread,
Author