Last active
August 29, 2015 14:23
-
-
Save jonsuh/40182e455b11e2b7ff7c to your computer and use it in GitHub Desktop.
~/.bash_profile
This file contains hidden or 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
# Open applications | |
alias opentest='open "/Applications/Adium.app" && open "/Applications/Adobe Photoshop CC 2015/Adobe Photoshop CC 2015.app"' | |
# Close applications | |
alias closetest='osascript -e "quit app \"Adium\"" && osascript -e "quit app \"Adobe Photoshop CC 2015\""' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Open application Terminal command
Close application Terminal command
Application Name for the close command is the "visual" name (the name you'd see in the Dock or App Switcher)
For multiple commands at once use
&&
to separateTo make a command-line shortcut (alias) to run these commands, edit your
~/.bash_profile
file (i.e.nano ~/.bash_profile
)If you don't have a
.bash_profile
file, create one in your~/
(/Users/username/
) directoryDeclare an alias with a command like such:
Now to put the two together:
Save the file (CTRL+X). Save changes (Y). When prompted for the File Name, just press Enter
Reload your
~/.bash_profile
so Terminal loads in the new aliases by running this command:Type
opentest
and watch the magic happen