Commit Graph
100 Commits
Author SHA1 Message Date
Junegunn Choi afc955771c Update CHANGELOG 2025-09-17 19:37:33 +09:00
Junegunn Choi c134c6f898 Update man page 2025-09-17 19:35:43 +09:00
Junegunn Choi 95697b96f8 Doc 2025-09-16 21:40:24 +09:00
Junegunn Choi 3809ebb0c8 Use grey background color 2025-09-16 21:37:00 +09:00
Junegunn Choi ca9b4d5a49 Use white foreground color 2025-09-16 21:23:24 +09:00
Junegunn Choi 04888f5b94 Make info yellow, no italics 2025-09-16 21:23:24 +09:00
Junegunn Choi 3072b46218 Adjust default themes
Motivation:

`--color 16` can be a better default than `dark` or `light`, since it uses
the colors defined by the current theme. This usually blends in more
naturally and works well in both light and dark modes.

However, some elements were previously hard-coded with white or black
foreground colors, which can cause rendering issues in certain terminal
themes.

* 16
  * Avoid using black or white foreground colors, so it works better with
    both dark and light themes
  * Display 'info' in italic to better separate it from the other parts
* dark / light
  * Display 'info' in italic for consistency
2025-09-16 21:23:24 +09:00
Junegunn Choi a67aa85820 Style change: thinner gutter column (#4521) 2025-09-16 21:22:56 +09:00
Junegunn Choi cbed41cd82 No emoji 2025-09-14 21:08:48 +09:00
Junegunn Choi 6684771cbf Fix CTRL-Z for tcell renderer by using the official API
See https://github.com/gdamore/tcell/pull/431
2025-09-14 11:41:12 +09:00
Junegunn Choi f5f894ea47 Fix rendering of multiple OSC 8 links in a single line
Fix #4517
2025-09-14 11:26:47 +09:00
Junegunn Choi 129cb23078 Require Go 1.23 2025-09-05 14:45:17 +09:00
Junegunn Choi de4059c8fa Update README 2025-09-03 08:18:57 +09:00
Junegunn Choi 416aff86e9 0.65.2 2025-08-31 22:18:44 +09:00
Junegunn Choi 5546c65491 Fix rendering of items with tabs when using a non-default ellipsis
Fix #4505
2025-08-27 23:31:31 +09:00
Junegunn Choi 9a53d84b9c Update README.md 2025-08-22 22:51:04 +09:00
Junegunn Choi 0a8ff7899c Do not unset FZF_DEFAULT_* variables when using winpty
Fix #4497
Fix #4400
2025-08-22 19:24:01 +09:00
Junegunn Choi 1afd143810 Fix incorrect truncation of --info-command with --info=inline-right
Fix #4479
2025-08-08 18:51:24 +09:00
Junegunn Choi e5cd7f0a3a 0.65.1 2025-08-03 14:41:56 +09:00
Junegunn Choi 179aec1578 Fix '--color nth:regular' not to reset ANSI attributes of the original text 2025-08-03 00:54:26 +09:00
Junegunn Choi af0014aba8 Fix a bug where you cannot unset the default --nth using change-nth 2025-08-03 00:29:05 +09:00
Junegunn Choi da3d995709 Fix $FZF_CLICK_{HEADER,FOOTER}_WORD with ANSI colors and tabs 2025-08-02 16:47:09 +09:00
Junegunn Choi 04c4269db3 0.65.0 2025-07-27 10:39:41 +09:00
Junegunn Choi 4efcc344c3 Add 'trigger(KEY_OR_EVENT[,...])' action 2025-07-23 19:41:06 +09:00
Junegunn Choi 5818b58350 Better fix for #4465 - remove unnecessary erase 2025-07-23 19:30:52 +09:00
Junegunn Choi 7941129cc4 Add 'click-footer' event 2025-07-22 23:24:23 +09:00
Junegunn Choi 069d71a840 Fix rendering error when hiding a preview window without border
This was a regression introduced in cdcab267.

Fix #4465
2025-07-22 19:23:10 +09:00
Junegunn Choi 08027e7a79 Fix --no-header-lines-border behavior
It should be different from --header-lines-border=none according to the
man page. It should merge two headers unlike the latter.
2025-07-22 19:16:55 +09:00
Junegunn Choi ead302981c Add support for {*n} and {*nf} placeholder
Close #4458
2025-07-20 10:53:58 +09:00
Junegunn Choi 821b8e70a8 [neovim] Fix margin background color when &winborder is used
Fix #4453
2025-07-19 16:19:48 +09:00
Junegunn Choi dea1df6878 Add missing mention of 'bg-cancel' to the man page 2025-07-12 20:09:54 +09:00
Junegunn Choi 0076ec2e8d 0.64.0 2025-07-06 22:11:36 +09:00
Junegunn Choi 82c9671f79 Fix selection lost on revision bump 2025-07-06 22:02:12 +09:00
Junegunn Choi d364a1122e Fix regression where header is not updated 2025-07-06 20:24:23 +09:00
Junegunn Choi fb570e94e7 Update: make generate 2025-07-06 20:03:13 +09:00
Junegunn Choi 6e3c830cd2 Add 'multi' event triggered on multi-selection changes 2025-07-06 10:05:25 +09:00
Junegunn Choi ff1550bb38 Normalize halfwidth and fullwidth characers for matching 2025-07-03 20:57:19 +09:00
Junegunn Choi 976001e474 Explain the need to escape placeholders in transform actions 2025-07-02 22:26:56 +09:00
Junegunn Choi 531dd6fb4f Update copyright year 2025-07-02 22:10:05 +09:00
Junegunn Choi ba035f2a76 Run preview command when preview window appears after CTRL-Z
https://github.com/junegunn/fzf/commit/80b88463188ff78719f23cb2e1dca5f27227879e
2025-07-02 21:40:02 +09:00
Junegunn Choi d34675d3c9 Fix panic caused by incorrect update ordering
Fix #4442

Make sure to prepare windows before rendering elements.

Thanks to @nugged for the report.
2025-07-02 21:28:11 +09:00
Junegunn Choi 397fe8e395 0.63.0 2025-06-28 01:11:00 +09:00
Junegunn Choi 111266d832 Reset full-background property after a new line 2025-06-27 23:21:48 +09:00
Junegunn Choi 79690724d8 Fix exact boundary match with --scheme=path or --tiebreak end
Fix #4438
2025-06-26 22:33:58 +09:00
Junegunn Choi 5ed87ffcb9 Fix highlight offsets of multi-line entries
Fix regression from 4811e52a
2025-06-26 20:48:34 +09:00
Junegunn Choi b99cb6323f Update CHANGELOG 2025-06-25 08:34:06 +09:00
Junegunn Choi debf3d8a8a Refactor ANSI parser 2025-06-25 08:26:14 +09:00
Junegunn Choi 4811e52af3 Support full-line background color in the list section
Close #4432
2025-06-25 02:12:10 +09:00
Junegunn Choi 8d81730ec2 with-nth: Do not trim trailing whitespaces with background colors
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 2025-06-23 22:12:32 +09:00
Junegunn Choi 3a21116307 Terminate running background transform on exit (addendum)
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
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
Close #4410

Example:
    fzf --pointer '' --marker '' --no-scrollbar --wrap --wrap-sign ''
2025-06-20 08:22:58 +09:00
Junegunn Choi 575bc0768c Update .goreleaser to build android_arm64 binary (#4428) 2025-06-19 22:57:16 +09:00
Junegunn Choi 89334e881e Update man page and changelog 2025-06-19 22:56:41 +09:00
Junegunn Choi dcec6354f5 Add {*} placeholder flag 2025-06-19 22:35:23 +09:00
Junegunn Choi 16d338da84 Revert "Add {*} placeholder flag"
This reverts commit 27258f7207.
2025-06-19 12:39:31 +09:00
Junegunn Choi 27258f7207 Add {*} placeholder flag 2025-06-19 01:04:59 +09:00
Junegunn Choi 0c00b203e6 Implement asynchronous transform actions (#4419)
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
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
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 1ecfa38eee [bash] Fix 'complete' errors when IFS is newline
Fix #4342
2025-05-30 20:41:50 +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'
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 d18c0bf694 [man] Add GET endpoint example 2025-05-22 21:57:04 +09:00
Junegunn Choi 4e3f9854e6 Update README.md 2025-05-17 22:06:06 +09:00
Junegunn Choi b27943423e Show ellipsis for truncated labels
Close #4390
2025-05-17 11:25:15 +09:00
Junegunn Choi 894a1016bc RuboCop lint 2025-05-17 11:20:29 +09:00
Junegunn Choi efe6cddd34 Update README 2025-05-16 22:15:38 +09:00
Junegunn Choi f1c6bdf3e8 Update README 2025-05-16 22:15:06 +09:00
Junegunn Choi 710659bcf5 Update SECURITY.md 2025-05-14 11:06:15 +09:00
Junegunn Choi d226d841a1 0.62.0 2025-05-04 18:31:18 +09:00
Junegunn Choi c6d83047e5 Allow whitespace as separator in --color option 2025-05-04 15:08:23 +09:00
Junegunn Choi 46dabccdf1 [vim] Update g:fzf_colors example with 'query' 2025-05-04 14:52:22 +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'
Fix #4364
2025-04-25 21:30:25 +09:00
Junegunn Choi d24b58ef3f 0.61.3 2025-04-22 20:53:23 +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 90ad1b7f22 0.61.2 2025-04-20 11:37:15 +09:00
Junegunn Choi f22fbcd1af Fix typo and update CHANGLOG 2025-04-20 11:31:15 +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
Junegunn Choi 0edb5d5ebb Fix trailing ␊ not rendered with '--read0 --no-multi-line'
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 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 e15cba0c8c 0.61.0 2025-03-30 19:51:28 +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 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 2025-03-26 16:00:05 +09:00