summaryrefslogtreecommitdiffstats
path: root/src/constants.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/constants.go
parent7f5f6efbac677603181434193abbb2a8d550b8b5 (diff)
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/constants.go')
-rw-r--r--src/constants.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/constants.go b/src/constants.go
index cfd3a3bc..d5445299 100644
--- a/src/constants.go
+++ b/src/constants.go
@@ -55,7 +55,7 @@ var defaultCommand string
func init() {
if !util.IsWindows() {
- defaultCommand = `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-`
+ 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-`
} 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 {