Skip to content
Myr

Increase FZF_DEFAULT_SORT to 1000

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 4530819 · Browse files · 3 files+6 added−6 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+6 added−6 removed

  • tests:+3 added−3 removed
  • other:+3 added−3 removed

3 files+6 added−6 removed

modified:test/test_fzf.rb+3 added-3 removed
6 unmodified lines
78class TestFZF < MiniTest::Unit::TestCase9 def test_default_options10 fzf = FZF.new []11 assert_equal 500, fzf.sort11 assert_equal 1000, fzf.sort12 assert_equal false, fzf.multi13 assert_equal true, fzf.color14 assert_equal Regexp::IGNORECASE, fzf.rxflag1516 begin17 ENV['FZF_DEFAULT_SORT'] = '1000'17 ENV['FZF_DEFAULT_SORT'] = '1500'18 fzf = FZF.new []19 assert_equal 1000, fzf.sort19 assert_equal 1500, fzf.sort20 ensure21 ENV.delete 'FZF_DEFAULT_SORT'22 end23 end
282 unmodified lines
modified:fzf+2 added-2 removed
67 unmodified lines
68 def initialize argv, source = $stdin69 usage 0 unless (%w[--help -h] & argv).empty?70 @rxflag = argv.delete('+i') ? 0 : Regexp::IGNORECASE71 @sort = %w[+s --no-sort].map { |e| argv.delete e }.compact.empty? ?72 ENV.fetch('FZF_DEFAULT_SORT', 500).to_i : nil72 ENV.fetch('FZF_DEFAULT_SORT', 1000).to_i : nil73 @color = %w[+c --no-color].map { |e| argv.delete e }.compact.empty?74 @multi = !%w[-m --multi].map { |e| argv.delete e }.compact.empty?75 @xmode = !%w[-x --extended].map { |e| argv.delete e }.compact.empty?76 rest = argv.join ' '
33 unmodified lines
110 $stderr.puts %[usage: fzf [options]111112 -m, --multi Enable multi-select113 -x, --extended Extended-search mode114 -s, --sort=MAX Maximum number of matched items to sort. Default: 500.114 -s, --sort=MAX Maximum number of matched items to sort. Default: 1000115 +s, --no-sort Do not sort the result. Keep the sequence unchanged.116 +i Case-sensitive match117 +c, --no-color Disable colors]118 exit x
689 unmodified lines
modified:README.md+1 added-1 removed
71 unmodified lines
72usage: fzf [options]7374 -m, --multi Enable multi-select75 -x, --extended Extended-search mode76 -s, --sort=MAX Maximum number of matched items to sort. Default: 50076 -s, --sort=MAX Maximum number of matched items to sort. Default: 100077 +s, --no-sort Do not sort the result. Keep the sequence unchanged.78 +i Case-sensitive match79 +c, --no-color Disable colors80```
187 unmodified lines