mirror of
https://github.com/junegunn/fzf.git
synced 2025-08-20 23:13:49 -07:00
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:
@@ -23,7 +23,7 @@ func TestReadFromCommand(t *testing.T) {
|
||||
}
|
||||
|
||||
// Normal command
|
||||
reader.fin(reader.readFromCommand(`echo abc && echo def`))
|
||||
reader.fin(reader.readFromCommand("sh", `echo abc && echo def`))
|
||||
if len(strs) != 2 || strs[0] != "abc" || strs[1] != "def" {
|
||||
t.Errorf("%s", strs)
|
||||
}
|
||||
@@ -48,7 +48,7 @@ func TestReadFromCommand(t *testing.T) {
|
||||
reader.startEventPoller()
|
||||
|
||||
// Failing command
|
||||
reader.fin(reader.readFromCommand(`no-such-command`))
|
||||
reader.fin(reader.readFromCommand("sh", `no-such-command`))
|
||||
strs = []string{}
|
||||
if len(strs) > 0 {
|
||||
t.Errorf("%s", strs)
|
||||
|
Reference in New Issue
Block a user