Created
February 28, 2017 11:56
-
-
Save 2bbb/f1396075f9ee4deed3d56892aae57961 to your computer and use it in GitHub Desktop.
open directory on current Finder window on code
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const Finder = Application("Finder"); | |
| Finder.activate(); | |
| const window = Finder.finderWindows()[0]; | |
| const path = decodeURI(window.target().url().slice(7)); | |
| const currentApp = Application.currentApplication(); | |
| currentApp.includeStandardAdditions = true; | |
| currentApp.doShellScript("/usr/local/bin/code " + path); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment