diff --git a/src/constants.go b/src/constants.go index e6ed1702..8eddce9f 100644 --- a/src/constants.go +++ b/src/constants.go @@ -55,7 +55,7 @@ var defaultCommand string func init() { if !util.IsWindows() { - defaultCommand = `set -o pipefail; (command find -L . -mindepth 1 \( -path '*/\.*' -o -fstype 'sysfs' -o -fstype 'devfs' -o -fstype 'devtmpfs' -o -fstype 'proc' \) -prune -o -type f -print -o -type l -print || command find -L . -mindepth 1 -path '*/\.*' -prune -o -type f -print -o -type l -print) 2> /dev/null | cut -b3-` + defaultCommand = `set -o pipefail; command find -L . -mindepth 1 \( -path '*/\.*' -o -fstype 'sysfs' -o -fstype 'devfs' -o -fstype 'devtmpfs' -o -fstype 'proc' \) -prune -o -type f -print -o -type l -print 2> /dev/null | cut -b3-` } else if os.Getenv("TERM") == "cygwin" { defaultCommand = `sh -c "command find -L . -mindepth 1 -path '*/\.*' -prune -o -type f -print -o -type l -print 2> /dev/null | cut -b3-"` } else { diff --git a/src/terminal.go b/src/terminal.go index 98d837c8..7dbdb6ec 100644 --- a/src/terminal.go +++ b/src/terminal.go @@ -691,7 +691,11 @@ func (t *Terminal) printInfo() { output += fmt.Sprintf(" (%d%%)", t.progress) } if !t.success && t.count == 0 { - output += " [ERROR]" + if len(os.Getenv("FZF_DEFAULT_COMMAND")) > 0 { + output = "[$FZF_DEFAULT_COMMAND failed]" + } else { + output = "[default command failed - $FZF_DEFAULT_COMMAND required]" + } } if pos+len(output) <= t.window.Width() { t.window.CPrint(tui.ColInfo, 0, output)