-
-
Save maxjowett/1abde81ed60aba5f4488a1303af00517 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
open -na "/Applications/Google Chrome.app" "https://www.youtube.com/watch?v=5qap5aO4i9A" | |
echo Enjoy! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
To run a script your OS will look through directories in your
$PATH
. Rather than adding your script to folders containing low level utilities such asls
orcd
, I would suggest making your own personal directory.cd ~
andmkdir scripts
Since macOS has switched to ZSH as it's default shell, we will edit
.zshrc
, typically found here:/Users/<your_username>/.zshrc
. Not sure what your username is? Runwhoami
in your terminal.Chances are all it currently contains is something along the lines of:
export PATH=$HOME/bin:/usr/local/bin:$PATH
If thats the case, you're in good shape! Add the following line below:
path+=(/Users/<your_username>/scripts)
Save the file, and run
source ~/.zshrc
.Last but not least, once you add a script to the scripts folder, navigate into your scripts folder and run
chmod +x <filename>
to mark the script as executable.🎉