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/sh | |
# | |
# Open a new Mac OS X terminal window or tab in the current or another | |
# directory and optionally run a command in the new window or tab. | |
# | |
# - Without any arguments, the new terminal window opens in | |
# the current directory, i.e. the executed command is "cd $PWD". | |
# - If the first argument is a directory, the new terminal will "cd" into | |
# that directory before executing the remaining arguments as command. | |
# - The optional "-t" flag executes the command in a new tab |