Skip to content

Instantly share code, notes, and snippets.

@tomoya
Created April 2, 2015 09:39
Show Gist options
  • Save tomoya/199fc43e1c55f7f176b2 to your computer and use it in GitHub Desktop.
Save tomoya/199fc43e1c55f7f176b2 to your computer and use it in GitHub Desktop.
my:open-finder
{BufferedProcess} = require 'atom'
path = require 'path'
atom.commands.add 'atom-text-editor', 'my:open-finder', ->
editor = atom.workspace.getActiveTextEditor()
cd = path.dirname(editor.getPath())
command = 'open'
args = [cd]
process = new BufferedProcess({command, args})
console.log "open #{cd}"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment