Skip to content
Myr

Rename --history-max to --history-size

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

Considering HISTSIZE and HISTFILESIZE of bash

authored by Junegunn Choi · committed by Junegunn Choi · parent a8b2c25 · Browse files · 2 files+4 added−4 removed
This commit

State

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

Diff stats

2 files+4 added−4 removed

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

2 files+4 added−4 removed

modified:src/options.go+3 added-3 removed
42 unmodified lines
43 --prompt=STR Input prompt (default: '> ')44 --toggle-sort=KEY Key to toggle sort45 --bind=KEYBINDS Custom key bindings. Refer to the man page.46 --history=FILE History file47 --history-max=N Maximum number of history entries (default: 1000)47 --history-size=N Maximum number of history entries (default: 1000)4849 Scripting50 -q, --query=STR Start the finder with the given query51 -1, --select-1 Automatically select the only match
645 unmodified lines
697 case "--no-history":698 opts.History = nil699 case "--history":700 setHistory(nextString(allArgs, &i, "history file path required"))701 case "--history-max":701 case "--history-size":702 setHistoryMax(nextInt(allArgs, &i, "history max size required"))703 case "--version":704 opts.Version = true705 default:
24 unmodified lines
730 keymap, opts.Execmap, opts.ToggleSort =731 parseKeymap(keymap, opts.Execmap, opts.ToggleSort, value)732 } else if match, value := optString(arg, "--history="); match {733 setHistory(value)734 } else if match, value := optString(arg, "--history-max="); match {734 } else if match, value := optString(arg, "--history-size="); match {735 setHistoryMax(atoi(value))736 } else {737 errorExit("unknown option: " + arg)738 }
42 unmodified lines
modified:test/test_go.rb+1 added-1 removed
550 unmodified lines
551 history_file = '/tmp/fzf-test-history'552553 # History with limited number of entries554 File.unlink history_file rescue nil555 opts = "--history=#{history_file} --history-max=4"555 opts = "--history=#{history_file} --history-size=4"556 input = %w[00 11 22 33 44].map { |e| e + $/ }557 input.each do |keys|558 tmux.send_keys "seq 100 | #{fzf opts}", :Enter559 tmux.until { |lines| lines[-2].include? '100/100' }
291 unmodified lines