Update FZF_DEFAULT_COMMAND

- Use bash for `set -o pipefail`
- Fall back to simpler find command when the original command failed

Related: #1061
This commit is contained in:
Junegunn Choi
2017-09-28 23:05:02 +09:00
parent 7f5f6efbac
commit ee40212e97
5 changed files with 21 additions and 8 deletions

View File

@@ -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)
}