Open current bash location explicitly in Finder

2

1

When double clicking a bundle folder (folder called *.bundle), a Terminal window opens as expected. However,

$ open .

does not then open a Finder window but another Terminal.

Is there a way to tell the open command to explicitly use the Finder as app?

Joel Hamme

Posted 2013-08-12T17:54:25.003

Reputation: 123

Theoretically, there is a option to do this: "$ open . -a [application]". That doesn't work with simply typing "Finder"/"finder", though. – Joel Hamme – 2013-08-12T17:55:02.803

Should be possible with AppleScript's tell application "Finder" to open folder …, but I'm not sure on the details – not on a Mac right now. – slhck – 2013-08-12T18:40:18.547

Answers

1

You can use open -R to reveal the bundle directory in Finder:

open -R .

It selects the bundle directory but doesn't show the package contents. This shows the package contents in list view and icon view but not in column view:

osascript -e 'tell application "Finder"' -e reopen -e 'set target of Finder window 1 to POSIX file (system attribute "PWD")' -e activate -e end

Lri

Posted 2013-08-12T17:54:25.003

Reputation: 34 501

Cool, have just set up my 37signals/sub to do that for me – Joel Hamme – 2013-08-31T19:54:31.457