Reputation: 10939
I have a personal scripts folder: ~/google_drive/code/scripts
. This folder is on my $path. $path is set in ~/.zshenv
and not changed anywhere else (I've disabled OS X path_helper and I don't touch $path in any other zsh startup file). In this scripts folder, there is a subdirectory called alfred_workflows
. From the command line, from any location I am able to run scripts in this folder with relative paths. This is expected:
$ alfred_workflows/test.sh
#=> test successful
But in a script, this does not work. It generates an error:
$ zsh -c "alfred_workflows/test.sh"
#=> zsh:1: no such file or directory: alfred_workflows/test.sh
Once again, the scripts
directory that contains alfred_workflows
is on $path
, which is set in ~/.zshenv
, and I am able to run executables that reside in the top level of this directory from a script. The issue only seems to be when I try to go through a subdirectory. What might be the problem?
Upvotes: 1
Views: 1057