Ste*_*ett 3 terminal focus osx-snow-leopard
我正在寻找一种让终端在命令完成后引起我注意的方法。像这样的东西:
$ ./lengthy_command.sh ; focus_terminal
Run Code Online (Sandbox Code Playgroud)
有没有什么简单的方法可以在雪豹上做到这一点?
Gor*_*son 10
$ ./lengthy_command.sh; osascript -e 'tell application "Terminal" to activate'
Run Code Online (Sandbox Code Playgroud)
如果你想变得更狂热:
$ ./lengthy_command.sh; osascript -e 'tell application "Terminal"' -e 'activate' -e 'display alert "Done!"' -e 'end tell'
Run Code Online (Sandbox Code Playgroud)