cnstntn-kndrtv / open-in-buttons-for-finder-toolbar

Open in TextMate, open in VS Code buttons for Finder toolbar and MB pro Touch Bar
The Unlicense
321 stars 46 forks source link

Open in iterm does not work if selected item is a file #9

Closed boillodmanuel closed 5 years ago

boillodmanuel commented 5 years ago

To resolve this, i update the script like this :

...
tell the current session
    write text "if [ -d " & _cwd & " ]; then cd " & _cwd & "; else cd \"$(dirname " & _cwd & ")\"; fi; clear;"
end tell
...

There may exist other solutions but this one is fine to me.

cnstntn-kndrtv commented 5 years ago

Hi. Thank you. Can you make a PR? Also you can try something like this (with Apple script) https://github.com/hamxiaoz/open-folder-with-sublime

boillodmanuel commented 5 years ago

PR #11 open.

Also you can try something like this (with Apple script) https://github.com/hamxiaoz/open-folder-with-sublime

I don't, sorry