Make Scripts Available Everywhere
Right now you have to type the full path to run your script. To run it from anywhere, put it in a folder that's in your PATH.
Create a Scripts Folder
1
Create a folder for your scripts:
mkdir -p ~/bin
2
Add this line to your ~/.zshrc:
export PATH="$HOME/bin:$PATH"
3
Reload your config:
source ~/.zshrc
4
Move your script there:
mv ~/myinfo.sh ~/bin/myinfo
Now just type myinfo from anywhere and it runs.
Key Takeaway
Put scripts in ~/bin and add it to your PATH. Then run them like any command, from anywhere.