Favors the line with shorter matched chunk. A chunk is a set of
consecutive non-whitespace characters.
Unlike the default `length`, this new scheme works well with tabular input.
# length prefers item #1, because the whole line is shorter,
# chunk prefers item #2, because the matched chunk ("foo") is shorter
fzf --height=6 --header-lines=2 --tiebreak=chunk --reverse --query=fo << "EOF"
N | Field1 | Field2 | Field3
- | ------ | ------ | ------
1 | hello | foobar | baz
2 | world | foo | bazbaz
EOF
If the input does not contain any spaces, `chunk` is equivalent to
`length`. But we're not going to set it as the default because it is
computationally more expensive.
Close#2285Close#2537
- Not the exact solution to --tiebreak=length not taking --nth into account,
but this should work. And the added benefit is that it works well even
when --nth is not provided.
- Adding a bonus point to the last character of a word didn't turn out great.
The order of the result suddenly changes when you type in the last
character in the word producing a jarring effect.
So you can "rotate" through the different options with a single binding.
fzf --preview 'cat {}' \
--bind 'ctrl-/:change-preview-window(70%|down,40%,border-horizontal|hidden|)'
Close#2376
The new actions are named with 'change-' prefix to differentiate from
the pre-existing, one-off 'preview(...)' action.
Fix#2360Fix#2505Fix#2666
Related #2435
Related #2376
- Can set up multiple bindings with different change-preview-window actions
- Not possible to "rotate" through the options with a single binding
- Enlarge or shrink not possible
- `--phony` renamed to `--disabled` for consistency
- `--no-phony` is now `--enabled`
- Added `enable-search`, `disable-search`, and `toggle-search` actions
for `--bind`
- Added `--color` options: `query` and `disabled`
Close#2303
Fix#2254
- Properly handle extra chars in the buffer. Patch suggested by @mckelly2833.
- Support alt-arrow sequences in \e[1;3A format
- Support shift-alt-arrow sequences in \e[1;10A format