mirror of
https://github.com/junegunn/fzf.git
synced 2026-10-13 00:20:20 +08:00
Fix FZF_DEFAULT_COMMAND
This commit is contained in:
1 parent
dc67420319
commit
3f73554a9e
2 files changed
+5
-4
No files matched your search
@@ -305,9 +305,10 @@ end
|
||||
|
||||
@read =
|
||||
if $stdin.tty?
|
||||
if !`which find`.empty?
|
||||
IO.popen(ENV.fetch('FZF_DEFAULT_COMMAND',
|
||||
"find * -path '*/\\.*' -prune -o -type f -print -o -type l -print 2> /dev/null"))
|
||||
if default_command = ENV['FZF_DEFAULT_COMMAND']
|
||||
IO.popen(default_command)
|
||||
elsif !`which find`.empty?
|
||||
IO.popen("find * -path '*/\\.*' -prune -o -type f -print -o -type l -print 2> /dev/null")
|
||||
else
|
||||
exit 1
|
||||
end
|
||||
|
||||
Reference in new issue
Block a user