From 3f73554a9e78b60b7a227cf2557f5686c1482aad Mon Sep 17 00:00:00 2001 From: Junegunn Choi Date: Tue, 5 Nov 2013 21:05:24 +0900 Subject: [PATCH] Fix FZF_DEFAULT_COMMAND --- fzf | 7 ++++--- fzf.gemspec | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/fzf b/fzf index 091d1ada..8e39139f 100755 --- a/fzf +++ b/fzf @@ -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 diff --git a/fzf.gemspec b/fzf.gemspec index daa20671..01d33e72 100644 --- a/fzf.gemspec +++ b/fzf.gemspec @@ -1,7 +1,7 @@ # coding: utf-8 Gem::Specification.new do |spec| spec.name = 'fzf' - spec.version = '0.2.1' + spec.version = '0.2.2' spec.authors = ['Junegunn Choi'] spec.email = ['junegunn.c@gmail.com'] spec.description = %q{Fuzzy finder for your shell}