What arguments does the Mac's Terminal.app accept?

I've found that running open -a Terminal /path/to/folder will open a new Terminal window at the given folder.

What is the best place to look to find documentation on all of the command-line arguments that Terminal.app accepts?

(my Google-fu seems to be broken today - I seem to keep finding articles on how to use "open" command with "--arg myargs" within Terminal, not what args Terminal actually takes)


Solution 1:

I looked at Terminal.app's Info.plist file for possible hints for arguments; I see the FilePath requirement, as a Service. Services are Mac OS X's way of interacting with other apps: If you drag a folder to the Terminal icon in the Dock, for instance, it'll do the same as 'open Terminal /path/to/folder'. Other things I see are hooks to open Unix man pages, but it's not clear as how to invoke this; I expect it'd be via a pulldown menu like other Mac OS services.

However, technically, it's not 'Terminal.app' that accepted the argument in your query, but rather /usr/bin/open; this command has a man page which I need not copy here.