summaryrefslogtreecommitdiff
path: root/src/util/util_unix.go
diff options
context:
space:
mode:
authorJunegunn Choi <junegunn.c@gmail.com>2017-09-28 23:05:02 +0900
committerJunegunn Choi <junegunn.c@gmail.com>2017-09-28 23:05:02 +0900
commitee40212e9772941b49a4bdb1e95f99913cdea469 (patch)
tree799667bda43ca07dbb33b3992f10ba6ea608062e /src/util/util_unix.go
parent7f5f6efbac677603181434193abbb2a8d550b8b5 (diff)
downloadfzf-ee40212e9772941b49a4bdb1e95f99913cdea469.tar.gz
Update FZF_DEFAULT_COMMAND
- Use bash for `set -o pipefail` - Fall back to simpler find command when the original command failed Related: #1061
Diffstat (limited to 'src/util/util_unix.go')
-rw-r--r--src/util/util_unix.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/util/util_unix.go b/src/util/util_unix.go
index d538ee00..fc63c027 100644
--- a/src/util/util_unix.go
+++ b/src/util/util_unix.go
@@ -14,6 +14,11 @@ func ExecCommand(command string) *exec.Cmd {
if len(shell) == 0 {
shell = "sh"
}
+ return ExecCommandWith(shell, command)
+}
+
+// ExecCommandWith executes the given command with the specified shell
+func ExecCommandWith(shell string, command string) *exec.Cmd {
return exec.Command(shell, "-c", command)
}