Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

What's the opposite of ZSH_ARGZERO?



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