Skip to content
Myr

Use find as the default command on Cygwin environment

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Junegunn Choi · committed by Junegunn Choi · parent 773133c · Browse files · 3 files+13 added−16 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

3 files+13 added−16 removed

  • other:+13 added−16 removed

3 files+13 added−16 removed

deleted:src/constants_unix.go-8 removed
1// +build !windows23package fzf45const (6 // Reader7 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-`8)
deleted:src/constants_windows.go-8 removed
1// +build windows23package fzf45const (6 // Reader7 defaultCommand = `dir /s/b`8)
modified:src/constants.go+13 added
1package fzf23import (4 "os"5 "time"67 "github.com/junegunn/fzf/src/util"8)
38 unmodified lines
47 // Jump labels48 defaultJumpLabels string = "asdfghjklqwertyuiopzxcvbnm1234567890ASDFGHJKLQWERTYUIOPZXCVBNM`~;:,<.>/?'\"!@#$%^&*()[{]}-_=+"49)5051var defaultCommand string5253func init() {54 if !util.IsWindows() {55 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-`56 } else if os.Getenv("TERM") == "cygwin" {57 defaultCommand = `sh -c "command find -L . -mindepth 1 -path '*/\.*' -prune -o -type f -print -o -type l -print 2> /dev/null | cut -b3-"`58 } else {59 defaultCommand = `dir /s/b`60 }61}6263// fzf events64const (65 EvtReadNew util.EventType = iota66 EvtReadFin
13 unmodified lines