News for hackers. Stuff that matters.
Re:Opening the current Finder directory in iTerm2 by johncoltrane on Wednesday March 14, 2012 @01:48PM (#3704350)
I use a droplet in the Finder window for that. It's called Open iTerm here.app and I have no idea where I've found it. Google gives quite a bunch of results, though.

Before that, I've used another similar droplet called Open Terminal here.app.

In iTerm I use

    $ open .
to open the current directory in a Finder window.

I also have a little bash function to `cd` into the topmost Finder window:

    cdf () {
      CURRFOLDERPATH=$( /usr/bin/osascript <<"    EOT"
        tell application "Finder"
          try
              set currFolder to (folder of the front window as alias)
          on error
              set currFolder to (path to desktop folder as alias)
          end try
          POSIX path of currFolder
        end tell
        EOT
      )
      echo "cd to \"$CURRFOLDERPATH\""
      cd "$CURRFOLDERPATH"
    }

There are no comments on this comment yet.