From 65db7352b72845b306e6bc1388a4ad02d0f57a70 Mon Sep 17 00:00:00 2001 From: Junegunn Choi Date: Mon, 20 Jan 2025 02:00:03 +0900 Subject: [PATCH] 0.58.0 --- CHANGELOG.md | 6 +++--- README.md | 50 +++++++++++++++++++++++++++++++++++++++++++++++++- install | 2 +- install.ps1 | 2 +- main.go | 2 +- 5 files changed, 55 insertions(+), 7 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 11774280e38..87898044744 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,7 @@ CHANGELOG 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. @@ -67,8 +68,7 @@ Also, fzf now offers "style presets" for quick customization, which can be activ declare -f | perl -0 -pe 's/^}\n/}\0/gm' | bat --plain --language bash --color always | - fzf --read0 --ansi --layout reverse --multi --highlight-line \ - --gap + fzf --read0 --ansi --layout reverse --multi --highlight-line --gap ``` * 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. @@ -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. - This means you can just write `--delimiter '|'` instead of escaping it as `--delimiter '\|'` - Bug fixes -- Bug fixes in fish scripts (thanks to @bitraid) +- Bug fixes and improvements in fish scripts (thanks to @bitraid) 0.57.0 ------ diff --git a/README.md b/README.md index d681b7901ec..4d235998d8e 100644 --- a/README.md +++ b/README.md @@ -67,6 +67,7 @@ Table of Contents * [`--tmux` mode](#--tmux-mode) * [Search syntax](#search-syntax) * [Environment variables](#environment-variables) + * [Customizing the look](#customizing-the-look) * [Options](#options) * [Demo](#demo) * [Examples](#examples) @@ -423,9 +424,56 @@ or `py`. > > 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` | | +| `full` | | +| `minimal` | | + +Here's an example based on the `full` preset: + + + +
+ +```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' +``` + +
+ ### 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 If you learn by watching videos, check out this screencast by [@samoshkin](https://github.com/samoshkin) to explore `fzf` features. diff --git a/install b/install index 5f7d2cec070..30170f1e8fa 100755 --- a/install +++ b/install @@ -2,7 +2,7 @@ set -u -version=0.57.0 +version=0.58.0 auto_completion= key_bindings= update_config=2 diff --git a/install.ps1 b/install.ps1 index 10c1fabcb1e..64f62dc6a1d 100644 --- a/install.ps1 +++ b/install.ps1 @@ -1,4 +1,4 @@ -$version="0.57.0" +$version="0.58.0" $fzf_base=Split-Path -Parent $MyInvocation.MyCommand.Definition diff --git a/main.go b/main.go index f0ff3652c0e..6d088783c24 100644 --- a/main.go +++ b/main.go @@ -11,7 +11,7 @@ import ( "github.com/junegunn/fzf/src/protector" ) -var version = "0.57" +var version = "0.58" var revision = "devel" //go:embed shell/key-bindings.bash