This commit is contained in:
Junegunn Choi 2025-01-20 02:00:03 +09:00
parent a4db8bd7b5
commit 65db7352b7
No known key found for this signature in database
GPG Key ID: 254BC280FEF9C627
5 changed files with 55 additions and 7 deletions

View File

@ -3,6 +3,7 @@ CHANGELOG
0.58.0 0.58.0
------ ------
_Release highlights: https://junegunn.github.io/fzf/releases/0.58.0/_
This version introduces three new border types, `--list-border`, `--input-border`, and `--header-border`, offering much greater flexibility for customizing the user interface. This version introduces three new border types, `--list-border`, `--input-border`, and `--header-border`, offering much greater flexibility for customizing the user interface.
@ -67,8 +68,7 @@ Also, fzf now offers "style presets" for quick customization, which can be activ
declare -f | declare -f |
perl -0 -pe 's/^}\n/}\0/gm' | perl -0 -pe 's/^}\n/}\0/gm' |
bat --plain --language bash --color always | bat --plain --language bash --color always |
fzf --read0 --ansi --layout reverse --multi --highlight-line \ fzf --read0 --ansi --layout reverse --multi --highlight-line --gap
--gap
``` ```
* You can customize the line using `--gap-line[=STR]`. * You can customize the line using `--gap-line[=STR]`.
- You can specify `border-native` to `--tmux` so that native tmux border is used instead of `--border`. This can be useful if you start a different program from inside the popup. - You can specify `border-native` to `--tmux` so that native tmux border is used instead of `--border`. This can be useful if you start a different program from inside the popup.
@ -101,7 +101,7 @@ Also, fzf now offers "style presets" for quick customization, which can be activ
- A single-character delimiter is now treated as a plain string delimiter rather than a regular expression delimiter, even if it's a regular expression meta-character. - A single-character delimiter is now treated as a plain string delimiter rather than a regular expression delimiter, even if it's a regular expression meta-character.
- This means you can just write `--delimiter '|'` instead of escaping it as `--delimiter '\|'` - This means you can just write `--delimiter '|'` instead of escaping it as `--delimiter '\|'`
- Bug fixes - Bug fixes
- Bug fixes in fish scripts (thanks to @bitraid) - Bug fixes and improvements in fish scripts (thanks to @bitraid)
0.57.0 0.57.0
------ ------

View File

@ -67,6 +67,7 @@ Table of Contents
* [`--tmux` mode](#--tmux-mode) * [`--tmux` mode](#--tmux-mode)
* [Search syntax](#search-syntax) * [Search syntax](#search-syntax)
* [Environment variables](#environment-variables) * [Environment variables](#environment-variables)
* [Customizing the look](#customizing-the-look)
* [Options](#options) * [Options](#options)
* [Demo](#demo) * [Demo](#demo)
* [Examples](#examples) * [Examples](#examples)
@ -423,9 +424,56 @@ or `py`.
> >
> The available options are described later in this document. > The available options are described later in this document.
### Customizing the look
The user interface of fzf is fully customizable with a large number of
configuration options. For a quick setup, you can start with one of the style
presets — `default`, `full`, or `minimal` — using the `--style` option.
```sh
fzf --style full \
--preview 'fzf-preview.sh {}' --bind 'focus:transform-header:file --brief {}'
```
| Preset | Screenshot |
| :--- | :--- |
| `default` | <img src="https://raw.githubusercontent.com/junegunn/i/master/fzf-style-default.png"/> |
| `full` | <img src="https://raw.githubusercontent.com/junegunn/i/master/fzf-style-full.png"/> |
| `minimal` | <img src="https://raw.githubusercontent.com/junegunn/i/master/fzf-style-minimal.png"/> |
Here's an example based on the `full` preset:
<img src="https://raw.githubusercontent.com/junegunn/i/master/fzf-4-borders.png"/>
<details>
```sh
git ls-files | fzf --style full \
--border --padding 1,2 \
--border-label ' Demo ' --input-label ' Input ' --header-label ' File Type ' \
--preview 'fzf-preview.sh {}' \
--bind 'result:transform-list-label:
if [[ -z $FZF_QUERY ]]; then
echo " $FZF_MATCH_COUNT items "
else
echo " $FZF_MATCH_COUNT matches for [$FZF_QUERY] "
fi
' \
--bind 'focus:transform-preview-label:[[ -n {} ]] && printf " Previewing [%s] " {}' \
--bind 'focus:+transform-header:file --brief {} || echo "No file selected"' \
--bind 'ctrl-r:change-list-label( Reloading the list )+reload(sleep 2; git ls-files)' \
--color 'border:#aaaaaa,label:#cccccc' \
--color 'preview-border:#9999cc,preview-label:#ccccff' \
--color 'list-border:#669966,list-label:#99cc99' \
--color 'input-border:#996666,input-label:#ffcccc' \
--color 'header-border:#6699cc,header-label:#99ccff'
```
</details>
### Options ### Options
See the man page (`man fzf`) for the full list of options. See the man page (`fzf --man` or `man fzf`) for the full list of options.
### Demo ### Demo
If you learn by watching videos, check out this screencast by [@samoshkin](https://github.com/samoshkin) to explore `fzf` features. If you learn by watching videos, check out this screencast by [@samoshkin](https://github.com/samoshkin) to explore `fzf` features.

View File

@ -2,7 +2,7 @@
set -u set -u
version=0.57.0 version=0.58.0
auto_completion= auto_completion=
key_bindings= key_bindings=
update_config=2 update_config=2

View File

@ -1,4 +1,4 @@
$version="0.57.0" $version="0.58.0"
$fzf_base=Split-Path -Parent $MyInvocation.MyCommand.Definition $fzf_base=Split-Path -Parent $MyInvocation.MyCommand.Definition

View File

@ -11,7 +11,7 @@ import (
"github.com/junegunn/fzf/src/protector" "github.com/junegunn/fzf/src/protector"
) )
var version = "0.57" var version = "0.58"
var revision = "devel" var revision = "devel"
//go:embed shell/key-bindings.bash //go:embed shell/key-bindings.bash