Hi , currently, I'm doing:
0=${${(M)${0::=${(%):-%x}}:#/*}:-$PWD/$0}
on entry to each function or script. It works well, however, I'm planning to update the plugin standard recommendation for $0 support and I'm thinking if there are any circumstances where it might fail? $0 is to point to the script/function source.
Also, I'm looking for a way to disable the promptsubst/print -P for a single variable, something like `print -P ${(!%)var}`, where !% is to denote that prompt expansion should not be done.
--
Best regards,
Sebastian Gniazdowski