This is a plugin for the Micro text-editor.
It lets you run terminal commmands without leaving your editor, printing output to a view inside the editor.
PS: This plugin is OS-agnostic, and the Unix-specific things are merely for example.
Micro version >= 1.3.5 is required
- Add
https://raw.githubusercontent.com/sum01/cmdlog-micro/master/repo.json
to yourpluginrepos
, like so...
"pluginrepos": [
"https://raw.githubusercontent.com/sum01/cmdlog-micro/master/repo.json"
],
- Run
plugin install cmdlog
and restart Micro.
The main command is runit
. Using it looks like runit "git --version"
.
NOTE: Because of how Micro works, you must quote any input containing spaces.
But you don't have to quote a single command that has no args. So runit ls
is still valid.
Put "Alt-l": "cmdlog.prompt_runit"
(replace Alt-l
with desired keybind) in your bindings.json
.
This has the side-effect of not requiring to have to quote things, since the prompt will auto-quote your input.
Use the semi-colon ;
to chain commands, like so...
runit "ls -l;git --version"