mirror of
https://github.com/Llewellynvdm/fzf.git
synced 2024-11-13 17:06:28 +00:00
18 lines
276 B
Go
18 lines
276 B
Go
|
// +build !windows
|
||
|
|
||
|
package util
|
||
|
|
||
|
import (
|
||
|
"os"
|
||
|
"os/exec"
|
||
|
)
|
||
|
|
||
|
// ExecCommand executes the given command with $SHELL
|
||
|
func ExecCommand(command string) *exec.Cmd {
|
||
|
shell := os.Getenv("SHELL")
|
||
|
if len(shell) == 0 {
|
||
|
shell = "sh"
|
||
|
}
|
||
|
return exec.Command(shell, "-c", command)
|
||
|
}
|