fzf would restore the original query in input-less mode after executing
a chain of actions.
This commit changes the behavior so that the restoration
happens after each action to allow something like
'show-input+change-query(...)+hide-input'.
Fix#4326
Enable inserting multiple history commands. To disable, set `--no-multi`
through `$FZF_CTRL_R_OPTS`.
Also, remove the usage of `become` action, to avoid leaving behind
temporary files.
Co-authored-by: Junegunn Choi <junegunn.c@gmail.com>
When --nth is used with a custom --delimiter, the last delimiter was
included in the search scope, forcing you to write the delimiter in
a suffix-match query. This commit removes the last delimiter from the
search scope.
# No need to write 'bar,$'
echo foo,bar,baz | fzf --delimiter , --nth 2 --filter 'bar$'
This can be seen as a breaking change, but I'm gonna say it's a bug fix.
Fix#3983
This option can be used to replace a sed or awk in the post-processing step.
ps -ef | fzf --multi --header-lines 1 | awk '{print $2}'
ps -ef | fzf --multi --header-lines 1 --accept-nth 2
This may not be a very "Unix-y" thing to do, so I've always felt that fzf
shouldn't have such an option, but I've finally changed my mind because:
* fzf can be configured with a custom delimiter that is a fixed string
or a regular expression.
* In such cases, you'd need to repeat the delimiter again in the
post-processing step.
* Also, tools like awk or sed may interpret a regular expression
differently, causing mismatches.
You can still use sed, cut, or awk if you prefer.
Close#3987Close#1323
Close#2890Close#1396
You can't type in queries in this mode, and the only way to trigger an
fzf search is to use `search(...)` action.
# Click header to trigger search
fzf --header '[src] [test]' --no-input --layout reverse \
--header-border bottom --input-border \
--bind 'click-header:transform-search:echo ${FZF_CLICK_HEADER_WORD:1:-1}'
Examples:
# Border only around the header from --header-lines
seq 10 | fzf --header 'hello' --header-lines 2 --header-lines-border
# Both headers with borders
seq 10 | fzf --header 'hello' --header-lines 2 --header-border --header-lines-border
# Use 'none' to still separate two headers but without a border
seq 10 | fzf --header 'hello' --header-lines 2 --header-border --header-lines-border none --list-border