summaryrefslogtreecommitdiff
path: root/src/util/util_windows.go
diff options
context:
space:
mode:
authorJunegunn Choi <junegunn.c@gmail.com>2016-10-24 09:44:56 +0900
committerJunegunn Choi <junegunn.c@gmail.com>2016-11-07 02:32:14 +0900
commit0c573b3dffe806253e1df2447754a5f3939a11f0 (patch)
tree1fba66a85b6ce48ff3afca18f234a0e0b6ff0822 /src/util/util_windows.go
parent2cff00dce24df2a7e5add001423c6d8200b57c87 (diff)
downloadfzf-0c573b3dffe806253e1df2447754a5f3939a11f0.tar.gz
Prepare for termbox/windows build
`TAGS=termbox make` (or `go build -tags termbox`)
Diffstat (limited to 'src/util/util_windows.go')
-rw-r--r--src/util/util_windows.go17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/util/util_windows.go b/src/util/util_windows.go
new file mode 100644
index 00000000..a660f39e
--- /dev/null
+++ b/src/util/util_windows.go
@@ -0,0 +1,17 @@
+// +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 = "cmd"
+ }
+ return exec.Command(shell, "/c", command)
+}