Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
What's the opposite of ZSH_ARGZERO?
- X-seq: zsh-users 29720
- From: Felipe Contreras <felipe.contreras@xxxxxxxxx>
- To: Zsh Users <zsh-users@xxxxxxx>
- Subject: What's the opposite of ZSH_ARGZERO?
- Date: Wed, 6 Mar 2024 15:56:55 -0600
- Archived-at: <https://zsh.org/users/29720>
- List-id: <zsh-users.zsh.org>
Hi,
In order to write code that always uses the POSIX $0 regardless of the
POSIX_ARGZERO option one can simply use ZSH_ARGZERO.
But what if someone wants to do the opposite? Use the zsh $0 even if
POSIX_ARGZERO is on?
So far I've found that ${(%):-%N} is the best option, but I wonder if
there is a better one.
Either way it would be nice if there was a variable for that, say ZSH_0.
This also might simplify the zsh plugin standard:
https://wiki.zshell.dev/community/zsh_plugin_standard
Cheers.
--
Felipe Contreras
Messages sorted by:
Reverse Date,
Date,
Thread,
Author