Junegunn Choi
8d81730ec2
with-nth: Do not trim trailing whitespaces with background colors
...
CodeQL / Analyze (go) (push) Has been cancelled
build / build (push) Has been cancelled
Test fzf on macOS / build (push) Has been cancelled
Example:
echo -en ' \e[48;5;232mhello\e[48;5;147m ' | fzf --ansi --with-nth 1
2025-06-24 20:27:24 +09:00
Junegunn Choi
330a85c25c
Allow \e[K in addition to \e[0K for full-line background
CodeQL / Analyze (go) (push) Has been cancelled
build / build (push) Has been cancelled
Test fzf on macOS / build (push) Has been cancelled
2025-06-23 22:12:32 +09:00
Junegunn Choi
3a21116307
Terminate running background transform on exit (addendum)
...
CodeQL / Analyze (go) (push) Has been cancelled
build / build (push) Has been cancelled
Test fzf on macOS / build (push) Has been cancelled
Generate Sponsors README / deploy (push) Has been cancelled
Close #4422
2025-06-22 01:53:25 +09:00
Junegunn Choi
247d168af6
Terminate running background transform on exit
...
Close #4422
2025-06-21 23:24:38 +09:00
Junegunn Choi
b2a8a283c7
Reorganize code to ensure deletion of temp files
2025-06-21 23:06:46 +09:00
Junegunn Choi
c36ddce36f
Add bg-cancel action to ignore running background transforms
...
CodeQL / Analyze (go) (push) Has been cancelled
build / build (push) Has been cancelled
Test fzf on macOS / build (push) Has been cancelled
Close #4430
Example:
# Implement popup that disappears after 1 second
# * Use footer as the popup
# * Use `bell` to ring the terminal bell
# * Use `bg-transform-footer` to clear the footer after 1 second
# * Use `bg-cancel` to ignore currently running background transform actions
fzf --multi --list-border \
--bind 'enter:execute-silent(echo -n {+} | pbcopy)+bell' \
--bind 'enter:+transform-footer(echo Copied {} to clipboard)' \
--bind 'enter:+bg-cancel+bg-transform-footer(sleep 1)'
2025-06-21 17:28:48 +09:00
Junegunn Choi
c35d9cff7d
Avoid full redraw when changing header and footer windows
2025-06-21 12:40:56 +09:00
Junegunn Choi
549ce3cf6c
Do not reserve a single column at the end when scrollbar is hidden
...
CodeQL / Analyze (go) (push) Has been cancelled
build / build (push) Has been cancelled
Test fzf on macOS / build (push) Has been cancelled
Close #4410
Example:
fzf --pointer '' --marker '' --no-scrollbar --wrap --wrap-sign ''
2025-06-20 08:22:58 +09:00
Junegunn Choi
dcec6354f5
Add {*} placeholder flag
2025-06-19 22:35:23 +09:00
Junegunn Choi
16d338da84
Revert "Add {*} placeholder flag"
...
CodeQL / Analyze (go) (push) Has been cancelled
build / build (push) Has been cancelled
Test fzf on macOS / build (push) Has been cancelled
This reverts commit 27258f7207 .
2025-06-19 12:39:31 +09:00
Junegunn Choi
27258f7207
Add {*} placeholder flag
CodeQL / Analyze (go) (push) Has been cancelled
build / build (push) Has been cancelled
Test fzf on macOS / build (push) Has been cancelled
2025-06-19 01:04:59 +09:00
曹家巧
4d2d6a5ced
chore: fix function name ( #4425 )
...
Signed-off-by: xiaoxiangirl <caojiaqiao@outlook.com >
2025-06-19 00:47:14 +09:00
Junegunn Choi
0c00b203e6
Implement asynchronous transform actions ( #4419 )
...
CodeQL / Analyze (go) (push) Has been cancelled
build / build (push) Has been cancelled
Test fzf on macOS / build (push) Has been cancelled
Close #4418
Example:
fzf --bind 'focus:bg-transform-header(sleep 2; date; echo {})'
2025-06-16 00:39:11 +09:00
Junegunn Choi
3b68dcdd81
Add footer
...
CodeQL / Analyze (go) (push) Has been cancelled
build / build (push) Has been cancelled
Test fzf on macOS / build (push) Has been cancelled
Generate Sponsors README / deploy (push) Has been cancelled
Options:
--footer=STR String to print as footer
--footer-border[=STYLE] Draw border around the footer section
[rounded|sharp|bold|block|thinblock|double|horizontal|vertical|
top|bottom|left|right|line|none] (default: line)
--footer-label=LABEL Label to print on the footer border
--footer-label-pos=COL Position of the footer label
[POSITIVE_INTEGER: columns from left|
NEGATIVE_INTEGER: columns from right][:bottom]
(default: 0 or center)
The default border type for footer is 'line', which draws a single
separator between the footer and the list. It changes its position
depending on `--layout`, so you don't have to manually switch between
'top' and 'bottom'
The 'line' style is now supported by other border types as well.
`--list-border` is the only exception.
2025-06-10 23:02:23 +09:00
Junegunn Choi
39db026161
Fix inconsistent placement of header-lines with border options
...
fzf displayed --header-lines inconsistently depending on the presence of borders:
# --header and --header-lines co-located
seq 10 | fzf --header-lines 3 --header "$(seq 101 103)" --header-first
# --header and --header-lines separated
seq 10 | fzf --header-lines 3 --header "$(seq 101 103)" --header-first --header-lines-border
This commit fixes the inconsistency with the following logic:
* If only one of --header or --header-lines is provided, --header-first
applies to that single header.
* If both are present, --header-first affects only the regular --header,
not --header-lines.
2025-06-10 23:02:23 +09:00
Junegunn Choi
15d6c17390
Fix ANSI attributes lost when nth:regular is set
...
CodeQL / Analyze (go) (push) Has been cancelled
build / build (push) Has been cancelled
Test fzf on macOS / build (push) Has been cancelled
Generate Sponsors README / deploy (push) Has been cancelled
Example:
# foo was not displayed in italic
echo -e "\x1b[33;3mfoo \x1b[mbar" | fzf --ansi --color fg:dim,nth:regular --nth 1
2025-05-30 21:02:35 +09:00
Junegunn Choi
a9d1d42436
Fix ANSI attributes lost when 'regular' attribute is set to fg or nth
...
Examples:
echo -e "\x1b[33;3mfoo \x1b[mbar" | fzf --ansi --color fg:regular
echo -e "\x1b[33;3mfoo \x1b[mbar" | fzf --ansi --color nth:regular
2025-05-30 20:43:20 +09:00
Junegunn Choi
54fd92b7dd
--no-color: Keep ANSI attributes in the list
...
Example:
echo -e "\x1b[33;3mfoo \x1b[34;4mbar\x1b[m baz" | fzf --ansi --no-color
2025-05-30 20:33:21 +09:00
Junegunn Choi
835906d392
--no-color: Keep ANSI attributes in preview window
...
Example:
fzf --preview 'echo -e "\x1b[33;3mfoo \x1b[34;4mbar\x1b[m baz"' --no-color
2025-05-30 20:26:53 +09:00
Junegunn Choi
1721e6a1ed
Do not apply 'nth' attributes to trailing whitespaces
...
# foo bar
# ----- <- previously underlined trailing whitespace
# --- <- with the fix, trailing whitespace is excluded
fzf --color nth:underline --nth 1 <<< 'foo bar'
2025-05-30 19:43:10 +09:00
Junegunn Choi
c7ee3b833f
Fix FZF_CLICK_HEADER_NTH for multi-line headers
2025-05-30 17:10:26 +09:00
Junegunn Choi
ffb6e28ca7
Allow customizing --ghost color via '--color ghost'
...
CodeQL / Analyze (go) (push) Has been cancelled
build / build (push) Has been cancelled
Test fzf on macOS / build (push) Has been cancelled
Examples:
# Dimmed red
fzf --ghost booya --color ghost:red
# Regular red
fzf --ghost booya --color ghost:red:regular
Close #4398
2025-05-28 00:27:33 +09:00
Junegunn Choi
a4c6846851
Fix background color of 'disabled' query
...
fzf --color disabled:red,list-bg:blue --disabled --query foo --input-border
2025-05-28 00:17:41 +09:00
Junegunn Choi
b27943423e
Show ellipsis for truncated labels
...
CodeQL / Analyze (go) (push) Has been cancelled
build / build (push) Has been cancelled
Test fzf on macOS / build (push) Has been cancelled
Close #4390
2025-05-17 11:25:15 +09:00
Junegunn Choi
c6d83047e5
Allow whitespace as separator in --color option
2025-05-04 15:08:23 +09:00
Junegunn Choi
cd9517b679
Add 'alt-bg' color for striped lines ( #4370 )
...
Test cases:
1. 'jump' should show alternating background colors even when 'alt-bg' is
not defined as before.
go run main.go --bind load:jump
Two differences:
* The alternating lines will not be in bold (was a bug)
* The marker column will not be rendered with alternating background color
2. Use alternating background color when 'alt-bg' is set
go run main.go --color bg:238,alt-bg:237
go run main.go --color bg:238,alt-bg:237 --highlight-line
3. 'selected-bg' should take precedence
go run main.go --color bg:238,alt-bg:237,selected-bg:232 \
--highlight-line --multi --bind 'load:select+up+select+up'
4. Should work with text with ANSI colors
declare -f | perl -0777 -pe 's/^}\n/}\0/gm' |
bat --plain --language bash --color always |
go run main.go --read0 --ansi --reverse --multi \
--color bg:237,alt-bg:238,current-bg:236 --highlight-line
---
Close #4354
Fix #4372
2025-05-04 14:32:06 +09:00
Junegunn Choi
d2c662e54f
Reset coordinator delay on 'reload'
...
CodeQL / Analyze (go) (push) Has been cancelled
Test fzf on Linux / build (push) Has been cancelled
Test fzf on macOS / build (push) Has been cancelled
Generate Sponsors README / deploy (push) Has been cancelled
Fix #4364
2025-04-25 21:30:25 +09:00
RafaelDominiquini
06ae9b0f3b
Add missing environment variables ( #4356 )
...
Co-authored-by: Rafael Baboni Dominiquini <rafaeldominiquini@gmail.com >
Co-authored-by: Junegunn Choi <junegunn.c@gmail.com >
2025-04-22 20:51:43 +09:00
Junegunn Choi
2a9c1c06a4
Revert "Disable tmux popup when already running inside one ( #4351 )"
...
This reverts commit af8fe918d8 .
Fix #4360
Fix #4359
2025-04-22 20:20:21 +09:00
Junegunn Choi
1d761684c5
Add --tty-default=/dev/tty and --no-tty-default option ( #4352 )
...
Fix #4242 .
Use --no-tty-default, if you want fzf to perform a TTY look-up instead of defaulting to /dev/tty.
2025-04-20 11:24:50 +09:00
Pierre Guinoiseau
af8fe918d8
Disable tmux popup when already running inside one ( #4351 )
2025-04-18 17:35:48 +09:00
phanium
66df24040f
Fix panic when use header border without pointer/marker ( #4345 )
CodeQL / Analyze (go) (push) Has been cancelled
Test fzf on Linux / build (push) Has been cancelled
Test fzf on macOS / build (push) Has been cancelled
2025-04-13 20:24:29 +09:00
Junegunn Choi
0edb5d5ebb
Fix trailing ␊ not rendered with '--read0 --no-multi-line'
...
CodeQL / Analyze (go) (push) Has been cancelled
Test fzf on Linux / build (push) Has been cancelled
Test fzf on macOS / build (push) Has been cancelled
Generate Sponsors README / deploy (push) Has been cancelled
https://github.com/junegunn/fzf/pull/4334#issue-2966013714
# Should display foo␊
echo -en "foo\n" | fzf --read0 --no-multi-line
2025-04-11 20:46:49 +09:00
Junegunn Choi
9ffc2c7ca3
reader: Do not append '/' to '/'
...
https://github.com/junegunn/fzf/pull/4334#issue-2966013714
2025-04-11 20:38:16 +09:00
Junegunn Choi
93cb3758b5
0.61.1
CodeQL / Analyze (go) (push) Has been cancelled
Test fzf on Linux / build (push) Has been cancelled
Test fzf on macOS / build (push) Has been cancelled
2025-04-06 13:09:59 +09:00
Junegunn Choi
d22e75dcdd
Disable bracketed paste mode on exit
...
Related: #4338
2025-04-06 12:51:36 +09:00
Junegunn Choi
31fd207ba2
Add 'r' flag (raw) for unquoted output
...
By default, placeholder expressions are automatically quoted to ensure
they are safely passed as arguments to external programs.
The r flag ({r}, {r1}, etc.) disables this behavior, outputting the
evaluated value without quotes.
For example,
echo 'foo bar' | fzf --preview 'echo {} {r}'
The preview command becomes:
echo 'foo bar' foo bar
Since `{r}` expands to unquoted "foo bar", 'foo' and 'bar' are passed
as separate arguments.
**Use with caution** Unquoted output can lead to broken commands.
echo "let's go" | fzf --preview 'echo {r}'
Close #4330
2025-03-30 19:49:05 +09:00
Junegunn Choi
ba6d1b8772
Add change-ghost and transform-ghost
CodeQL / Analyze (go) (push) Has been cancelled
Test fzf on Linux / build (push) Has been cancelled
Test fzf on macOS / build (push) Has been cancelled
Generate Sponsors README / deploy (push) Has been cancelled
2025-03-28 23:35:20 +09:00
Junegunn Choi
0dce561ec9
Fix header window not updated on change-header
2025-03-28 23:23:43 +09:00
Junegunn Choi
664ee1f483
Add change-pointer and transform-pointer
...
Close #4178
2025-03-28 21:28:25 +09:00
Junegunn Choi
dac5b6fde1
Fix info not updated after track-current is disabled due to race condition
CodeQL / Analyze (go) (push) Has been cancelled
Test fzf on Linux / build (push) Has been cancelled
Test fzf on macOS / build (push) Has been cancelled
2025-03-26 16:00:05 +09:00
Junegunn Choi
998c57442b
Fix query precedence in an action chain ( #4326 )
...
When 'search' and any action that modifies the query are in an action
chain, anything that comes later takes precedence.
2025-03-26 15:47:43 +09:00
Junegunn Choi
4a0ab6c926
Improve query modification prevention in input-less mode
...
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
2025-03-26 10:34:52 +09:00
Junegunn Choi
f43e82f17f
Do not ignore current query when input is hidden
...
CodeQL / Analyze (go) (push) Has been cancelled
Test fzf on Linux / build (push) Has been cancelled
Test fzf on macOS / build (push) Has been cancelled
* The initial query given by --query should be respected
* The current query should still be respected after `hide-input`
(or `toggle-input)
Fix #4327
2025-03-25 21:08:06 +09:00
Junegunn Choi
62238620a5
Fix first entry not clickable when input section is hidden
...
CodeQL / Analyze (go) (push) Has been cancelled
Test fzf on Linux / build (push) Has been cancelled
Test fzf on macOS / build (push) Has been cancelled
Fix #4325
2025-03-24 22:08:57 +09:00
Junegunn Choi
200745011a
Fix cursor position when prompt is truncated
...
e.g.
fzf --preview 'cat {}' --prompt "$(seq 100 | xargs)"
fzf --preview 'cat {}' --prompt "$(seq 100 | xargs)" --input-border
2025-03-24 17:09:44 +09:00
Junegunn Choi
82fd88339b
Fix offset-middle not updating the list
CodeQL / Analyze (go) (push) Has been cancelled
Test fzf on Linux / build (push) Has been cancelled
Test fzf on macOS / build (push) Has been cancelled
2025-03-23 11:13:21 +09:00
Junegunn Choi
29cf28d845
Suppress 'change' event during bracketed paste mode
...
CodeQL / Analyze (go) (push) Waiting to run
Test fzf on Linux / build (push) Waiting to run
Test fzf on macOS / build (push) Waiting to run
Generate Sponsors README / deploy (push) Has been cancelled
Close #4316
2025-03-22 09:17:18 +09:00
Junegunn Choi
7e4dbb5f3b
Prevent start:track-current from being disabled
...
CodeQL / Analyze (go) (push) Has been cancelled
Test fzf on Linux / build (push) Has been cancelled
Test fzf on macOS / build (push) Has been cancelled
# track-current state can be immediately disabled
fzf --sync --bind 'start:track-current'
2025-03-20 11:51:20 +09:00
Junegunn Choi
f92f9f137a
Fix wrapping of the list section
...
CodeQL / Analyze (go) (push) Waiting to run
Test fzf on Linux / build (push) Waiting to run
Test fzf on macOS / build (push) Waiting to run
Generate Sponsors README / deploy (push) Has been cancelled
# The first line of the second chunk would prematurely wrap
printf '%0500s\n\n%0500s' 0 0 | fzf --wrap --read0
2025-03-16 01:57:20 +09:00