Are there any examples of packages that run commands? Do we have an output pane where we can output command results?
You can see the console
⌘ + ⌥ + I like in Chrome.
Or on the menu
View > Developer > Toggle Developer Tools
The symbols view package runs the
ctags command: https://github.com/atom/symbols-view/blob/master/lib/tag-generator.coffee
The settings view package runs the
apm command: https://github.com/atom/settings-view/blob/master/lib/package-manager.coffee
There is no built-in view for output but you could add a view to add to display it.
Node’s ChildProcess is included and you can do
require 'child_process' from your package to spawn/fork new command/processes.
How do you type the symbol for command and alt? Sorry for OT.
It wouldn’t be too bad to use the same kind of setup to run an arbitrary command.
- Create a view that drops from the top via a keybinding
- User types in their command, hits enter
- Create a
BufferedProcessthat populates in some side view (or bottom, etc.).
Make sure to set the options you use with BufferedProcess
options = cwd: atom.project.getPath() env: process.env
Honestly though, maybe I could just put it into the script package as cmd-r to run an arbitrary command in the same window. That would keep the UX/UI unified.