Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the 'Quit applications from the command line' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Quit applications from the command line
Authored by: santin on Jun 25, '04 03:51:57PM
For zsh users, here is a simpler approach as a function:

quit () {
        for app in $*; do
                osascript -e 'quit app "'$app'"'
        done
}
I also have a similar "relaunch" function:

relaunch () {
        for app in $*; do
                osascript -e 'quit app "'$app'"';
                open -a $app
        done
}
Place both code snippets in your .zshrc and you are set.
You can pass multiple applications as arguments, but remember to escape white spaces if the application name has multiple words:

quit System\ Preferences
or

quit "System Preferences"


[ Reply to This | # ]