mirror of
https://github.com/Llewellynvdm/fzf.git
synced 2024-11-05 04:57:50 +00:00
Rename --history-max to --history-size
Considering HISTSIZE and HISTFILESIZE of bash
This commit is contained in:
parent
a8b2c257cd
commit
3492c8b780
@ -44,7 +44,7 @@ const usage = `usage: fzf [options]
|
|||||||
--toggle-sort=KEY Key to toggle sort
|
--toggle-sort=KEY Key to toggle sort
|
||||||
--bind=KEYBINDS Custom key bindings. Refer to the man page.
|
--bind=KEYBINDS Custom key bindings. Refer to the man page.
|
||||||
--history=FILE History file
|
--history=FILE History file
|
||||||
--history-max=N Maximum number of history entries (default: 1000)
|
--history-size=N Maximum number of history entries (default: 1000)
|
||||||
|
|
||||||
Scripting
|
Scripting
|
||||||
-q, --query=STR Start the finder with the given query
|
-q, --query=STR Start the finder with the given query
|
||||||
@ -698,7 +698,7 @@ func parseOptions(opts *Options, allArgs []string) {
|
|||||||
opts.History = nil
|
opts.History = nil
|
||||||
case "--history":
|
case "--history":
|
||||||
setHistory(nextString(allArgs, &i, "history file path required"))
|
setHistory(nextString(allArgs, &i, "history file path required"))
|
||||||
case "--history-max":
|
case "--history-size":
|
||||||
setHistoryMax(nextInt(allArgs, &i, "history max size required"))
|
setHistoryMax(nextInt(allArgs, &i, "history max size required"))
|
||||||
case "--version":
|
case "--version":
|
||||||
opts.Version = true
|
opts.Version = true
|
||||||
@ -731,7 +731,7 @@ func parseOptions(opts *Options, allArgs []string) {
|
|||||||
parseKeymap(keymap, opts.Execmap, opts.ToggleSort, value)
|
parseKeymap(keymap, opts.Execmap, opts.ToggleSort, value)
|
||||||
} else if match, value := optString(arg, "--history="); match {
|
} else if match, value := optString(arg, "--history="); match {
|
||||||
setHistory(value)
|
setHistory(value)
|
||||||
} else if match, value := optString(arg, "--history-max="); match {
|
} else if match, value := optString(arg, "--history-size="); match {
|
||||||
setHistoryMax(atoi(value))
|
setHistoryMax(atoi(value))
|
||||||
} else {
|
} else {
|
||||||
errorExit("unknown option: " + arg)
|
errorExit("unknown option: " + arg)
|
||||||
|
@ -552,7 +552,7 @@ class TestGoFZF < TestBase
|
|||||||
|
|
||||||
# History with limited number of entries
|
# History with limited number of entries
|
||||||
File.unlink history_file rescue nil
|
File.unlink history_file rescue nil
|
||||||
opts = "--history=#{history_file} --history-max=4"
|
opts = "--history=#{history_file} --history-size=4"
|
||||||
input = %w[00 11 22 33 44].map { |e| e + $/ }
|
input = %w[00 11 22 33 44].map { |e| e + $/ }
|
||||||
input.each do |keys|
|
input.each do |keys|
|
||||||
tmux.send_keys "seq 100 | #{fzf opts}", :Enter
|
tmux.send_keys "seq 100 | #{fzf opts}", :Enter
|
||||||
|
Loading…
Reference in New Issue
Block a user