- Slightly more efficient processing of Options
- Do not return reference type arguments that are mutated inside the
function
- Use util.Constrain function when appropriate
Related: #452
When `--multi` is set, tab key will bring your cursor down, and
shift-tab up. But since fzf by default draws the screen in bottom-up
fashion, one may feel that the opposite of the behavior is more
desirable and choose to customize the key bindings as follows.
export FZF_DEFAULT_OPTS="--bind tab:toggle-up,shift-tab:toggle-down"
This configuration, however, becomes no longer straightforward when
`--reverse` is set and fzf switches to top-down layout. To address the
requirement, this commit adds `toggle-in` and `toggle-out` option which
switch direction depending on `--reverse`-ness.
export FZF_DEFAULT_OPTS="--bind tab:toggle-out,shift-tab:toggle-in"
`--null` is ambiguous. For completeness' sake, we need both `--read0`
and `--print0`.
`--read0` only makes sense when the input contains multiline entries.
However, fzf currently cannot correctly display multiline entries,
I'm going to make `--read0` an undocumented feature.
This can be used to avoid parse errors that can happen when the command
contains the closing character. Since the command does not finish at
a certain character, the key binding should be the last one in the
group. Suggested by @tiziano88. (#265)
e.g. fzf --bind "ctrl-m:execute=COMMAND..." --bind ctrl-j:accept
This change does have positive effect on startup time of fzf when many
number of options are provided.
time fzf --query=____ --filter=____ --delimiter=q --prompt=________ \
--nth=1,2,3,4 --with-nth=1,2,3,4 --toggle-sort=ctrl-r \
--expect=ctrl-x --tiebreak=index --color=light --bind=ctrl-t:accept \
--history=/tmp/xxx --history-max=1000 --help
0m0.013s -> 0m0.008s
- Add `--history` option (e.g. fzf --history ~/.fzf.history)
- Add `--history-max` option for limiting the size of the file (default 1000)
- Add `previous-history` and `next-history` actions for `--bind`
- CTRL-P and CTRL-N are automatically remapped to these actions when
`--history` is used
Closes#249, #251