diff --git a/README.md b/README.md index 3c7029f5..3d887d6b 100644 --- a/README.md +++ b/README.md @@ -73,7 +73,7 @@ usage: fzf [options] -m, --multi Enable multi-select -x, --extended Extended-search mode - -s, --sort=MAX Maximum number of matched items to sort. Default: 500 + -s, --sort=MAX Maximum number of matched items to sort. Default: 1000 +s, --no-sort Do not sort the result. Keep the sequence unchanged. +i Case-sensitive match +c, --no-color Disable colors diff --git a/fzf b/fzf index 5c3c47f8..92627252 100755 --- a/fzf +++ b/fzf @@ -69,7 +69,7 @@ class FZF usage 0 unless (%w[--help -h] & argv).empty? @rxflag = argv.delete('+i') ? 0 : Regexp::IGNORECASE @sort = %w[+s --no-sort].map { |e| argv.delete e }.compact.empty? ? - ENV.fetch('FZF_DEFAULT_SORT', 500).to_i : nil + ENV.fetch('FZF_DEFAULT_SORT', 1000).to_i : nil @color = %w[+c --no-color].map { |e| argv.delete e }.compact.empty? @multi = !%w[-m --multi].map { |e| argv.delete e }.compact.empty? @xmode = !%w[-x --extended].map { |e| argv.delete e }.compact.empty? @@ -111,7 +111,7 @@ class FZF -m, --multi Enable multi-select -x, --extended Extended-search mode - -s, --sort=MAX Maximum number of matched items to sort. Default: 500. + -s, --sort=MAX Maximum number of matched items to sort. Default: 1000 +s, --no-sort Do not sort the result. Keep the sequence unchanged. +i Case-sensitive match +c, --no-color Disable colors] diff --git a/test/test_fzf.rb b/test/test_fzf.rb index 69cfa2f7..b33502df 100644 --- a/test/test_fzf.rb +++ b/test/test_fzf.rb @@ -8,15 +8,15 @@ load 'fzf' class TestFZF < MiniTest::Unit::TestCase def test_default_options fzf = FZF.new [] - assert_equal 500, fzf.sort + assert_equal 1000, fzf.sort assert_equal false, fzf.multi assert_equal true, fzf.color assert_equal Regexp::IGNORECASE, fzf.rxflag begin - ENV['FZF_DEFAULT_SORT'] = '1000' + ENV['FZF_DEFAULT_SORT'] = '1500' fzf = FZF.new [] - assert_equal 1000, fzf.sort + assert_equal 1500, fzf.sort ensure ENV.delete 'FZF_DEFAULT_SORT' end