I have a shell script that I want to run globally. It's current directory is
~/directory/script.sh
I can run the script only from the directory in which the script is located, however, I'd like to run it from every directory, not just the one that it's in.
I'm using Git bash in Windows 10. I've tried putting this line at the top of the file:
#!usr/local/bin
but that didn't work (probably because I'm using Windows), the bash said it doesn't recognize it.
I also tried using alias but it's not really a solution.
Is there a different way to run a shell script globally?