* 'pathname' is a new tiebreak option for prioritizing matches occurring
in the file name of the path.
* `--scheme=path` will automatically set `--tiebreak=pathname,length`.
* fzf will automatically choose `path` scheme when the input is a TTY device,
where fzf would start its built-in walker or run `$FZF_DEFAULT_COMMAND`
which is usually a command for listing files.
Close#4191
If you do not want 'current-fg' to inherit attributes of 'fg', prefix it
with 'regular:' to reset them.
# italic and underline
fzf --color fg:italic,current-fg:underline
# only underline
fzf --color fg:italic,current-fg:regular:underline
Example:
# Start with --nth 1, then 2, then 3, then back to the default, 1
echo 'foo foobar foobarbaz' | fzf --bind 'space:change-nth(2|3|)' --nth 1 -q foo
Close#4172Close#3109
It draws a single line between the preview window and the rest of the
interface. i.e. automatically choose between 'left', 'right', 'top', and
'bottom' depending on the position of the preview window.
A spec can have `exit` callback that is called with the exit status of fzf.
This can be used to clean up temporary resources or restore the original
state when fzf is closed without a selection.
This command would cause a deadlock and make fzf crash:
fzf --bind 'start:reload:ls' --height ~100%
Because,
1. 'start' event is handled by Terminal
2. When 'reload' is bound to 'start', fzf avoids starting the initial reader
3. Terminal waits for the initial input to find the right height when
adaptive height is used
4. Because the initial reader is not started, Terminal never gets the
initial list
5. No chance to trigger 'start:reload', hence deadlock
This commit fixes the above problem by extracting the reload command
bound to 'start' event and starting the initial reader with that command
instead of letting Terminal start it.
This commit also makes the environment variables available to
$FZF_DEFAULT_COMMAND.
FZF_DEFAULT_COMMAND='echo $FZF_QUERY' fzf --query foo
Fix#3944
This is needed when you run a Windows binary on WSL or zsh on Windows
where forward slashes are expected.
export FZF_DEFAULT_OPTS='--walker-path-sep /'
Close#3859