* Bug(?): unable to setopt pathscript
@ 2019-02-20 3:27 Marie-Helene Burle
2019-02-20 3:35 ` Eric Cook
0 siblings, 1 reply; 2+ messages in thread
From: Marie-Helene Burle @ 2019-02-20 3:27 UTC (permalink / raw)
To: zsh-workers
Hello,
Noob warning: I think that there might be a bug, but the mistake may be on my end as I am fairly new to zsh.
I seem unable to set the option PATH_SCRIPT.
In my ~/.zshrc file, I have "setopt pathscript". It seems to be taken into account: if I run "setopt" in the cli, I get a list of options including "pathscript".
However, if I run "zsh script.sh", I get "zsh: can't open input file: script.sh". (My script is in $PATH).
Now, if I run "zsh -o pathscript script.sh", it works...
So, even though "pathscript" gets listed by "setopt", it doesn't seem to take effect...
I rebooted with no change.
Am I doing something wrong? Or is there something going on??
Thank you!
Sincerely,
-----
Marie-Helene Burle (Marie)
Software Carpentry & Data Carpentry Instructor
RStudio Community Sustainer
Scientific Programming Study Group Admin
-----
http://www.sfu.ca/content/sfu/biology/people/profiles/msb2.html
https://marie-helene-burle.netlify.com/
https://github.com/prosoitos
https://twitter.com/MHBurle
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Bug(?): unable to setopt pathscript
2019-02-20 3:27 Bug(?): unable to setopt pathscript Marie-Helene Burle
@ 2019-02-20 3:35 ` Eric Cook
0 siblings, 0 replies; 2+ messages in thread
From: Eric Cook @ 2019-02-20 3:35 UTC (permalink / raw)
To: zsh-workers
On 2/19/19 10:27 PM, Marie-Helene Burle wrote:
> Hello,
>
> Noob warning: I think that there might be a bug, but the mistake may be on my end as I am fairly new to zsh.
>
> I seem unable to set the option PATH_SCRIPT.
>
> In my ~/.zshrc file, I have "setopt pathscript". It seems to be taken into account: if I run "setopt" in the cli, I get a list of options including "pathscript".
>
> However, if I run "zsh script.sh", I get "zsh: can't open input file: script.sh". (My script is in $PATH).
An non-interactive shell doesn't read .zshrc, which is meant for interactive shells.
.zshenv is read for non-interactive shells. you can see more about the start up files in man 1 zsh
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2019-02-20 3:36 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-02-20 3:27 Bug(?): unable to setopt pathscript Marie-Helene Burle
2019-02-20 3:35 ` Eric Cook
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).