3

I find myself doing this too often - navigate to a folder, "Open Terminal Here", then "mate .", then "python -m SimpleHTTPServer"

I was wondering if it's possible to add a button to the finder toolbar that when I click it runs those two commands for me for the folder that I'm currently in?

Thanks

4

The following AppleScript should work, which you can save as an application and put in your Finder toolbar.

tell application "Finder"
    try
        set folderPath to (quoted form of POSIX path of (target of front window as alias))
        tell application "Terminal"
            do script "cd " & folderPath & "; mate .; python -m SimpleHTTPServer"
        end tell
    end try
end tell
0

There are several apps like TextExpander that can do the text input for you. Another option might be to add a text substitution into the Language & Text System Pref under the Text pane.

There's a free Automator action, Open Terminal Here that seems like it should accomplish the first part.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .