mirror of
https://github.com/zyedidia/micro.git
synced 2026-03-02 19:00:17 +09:00
I'm trying to add more options for plugins that want to run shell commands. Also trying to add support for running shell commands in the terminal emulator from a plugin and return the output. More to come soon. Ref #979
19 lines
381 B
Go
19 lines
381 B
Go
// +build linux darwin dragonfly solaris openbsd netbsd freebsd
|
|
|
|
package main
|
|
|
|
import (
|
|
"github.com/zyedidia/micro/cmd/micro/shellwords"
|
|
)
|
|
|
|
const TermEmuSupported = true
|
|
|
|
func RunTermEmulator(input string, wait bool, getOutput bool) error {
|
|
args, err := shellwords.Split(input)
|
|
if err != nil {
|
|
return err
|
|
}
|
|
err = CurView().StartTerminal(args, wait, false, "")
|
|
return err
|
|
}
|