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

Re: PATH_DIRS



On 10/08/17 10:07 PM, Ray Andrews wrote:
... so it will be run if it's a script on my PATH, even if not '+x' then it seems intuitive that whence would also be able to find it.


Ah ... 'whence -m' not 'whence -ma' and it seems to be true one-stop shopping, all files are found, mind, that would be text files that aren't scripts, too, but 'file' shows the difference based on the hashbang, so I can use that to filter out non scripts since I always have a hashbang in any script. Not to be unclear about what I want to do, but it is a caution that I can:

$ . pea_soup_recipe

... and it tries to execute that if I was so unorganized as to have that file on my path somewhere. As Bart said, one can see the protection of requiring '+x', but that does not seem to be the case.




Messages sorted by: Reverse Date, Date, Thread, Author