Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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)

share|improve this question

2 Answers 2

Using my UNIX/LINUX-fu, have you tried (if it exists in mac) man terminal? from within terminal?

share|improve this answer
    
Unfortunately, since Terminal is an application and not a command/binary, there isn't a man page –  Lübnah Apr 8 '13 at 15:52
    
does terminal have a help file? i know that sounds stupid but its worth a shot –  Cole Busby Apr 8 '13 at 17:24
    
i just checked - looks like the help file only has the most basic info on Terminal usage :( –  Lübnah Apr 8 '13 at 17:43
    
what about running Terminal -h or Terminal -? or open -h / -? if you really need to do something big there's always applescript as well but that will defeat the purpose of using Terminal's command line to an extent. –  Cole Busby Apr 8 '13 at 17:46
1  
I appreciate your persistence @Cole, but Terminal is an application, not a command-line tool. Although it boggles the mind what would happen if you could run terminal from within the terminal… :P –  Lübnah Apr 8 '13 at 19:10

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.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.