zsh% setopt pathscriptzsh% set -o | grep pathscriptpathscript onzsh% zsh -c 'set -o | grep pathscript'pathscript off
/bin/zsh -o pathscript some_script
You have this almost correct. Sourcing for interactive mode has
nothing to do with it. It always applies to the scriptname argument
passed to a new zsh, so it has to be in effect before zsh searches for
the script.I may not be following you here.If I have a script at ./dir/some_script and I do:> PATH=./dir> setopt pathscriptThen do> /bin/zsh some_scriptIt will not look for the script in $PATH as far as I can tell and fails with zsh: can't open input file: some_scriptYou are saying my last command above should work with pathscript on?