mirror of
https://github.com/junegunn/fzf.git
synced 2026-06-14 11:39:54 +08:00
Compare commits
18 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 336cfdef02 | |||
| eee9672eb0 | |||
| 845752f305 | |||
| 9a61a1457d | |||
| dfcacb443d | |||
| 5412f39b84 | |||
| 07c5cd4185 | |||
| ce4bef7595 | |||
| 25868a62f7 | |||
| 7963a2c658 | |||
| 4b23aa45a8 | |||
| 3953d1c649 | |||
| 5e137613d3 | |||
| a24deef77b | |||
| 1b6e17ca39 | |||
| 94f6daa61c | |||
| 02594f8dbc | |||
| f81cb1939c |
@@ -0,0 +1,76 @@
|
|||||||
|
name: Release
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
tags:
|
||||||
|
- 'v*'
|
||||||
|
workflow_dispatch:
|
||||||
|
inputs:
|
||||||
|
version:
|
||||||
|
description: 'Version to validate (e.g. 0.73.0).'
|
||||||
|
type: string
|
||||||
|
required: true
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: write
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
release:
|
||||||
|
runs-on: macos-latest
|
||||||
|
environment: release
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v6
|
||||||
|
with:
|
||||||
|
fetch-depth: 0
|
||||||
|
|
||||||
|
- uses: actions/setup-go@v6
|
||||||
|
with:
|
||||||
|
go-version: stable
|
||||||
|
|
||||||
|
- name: Determine version
|
||||||
|
id: ver
|
||||||
|
run: |
|
||||||
|
if [ "${{ github.event_name }}" = "push" ]; then
|
||||||
|
v=${GITHUB_REF_NAME#v}
|
||||||
|
else
|
||||||
|
v='${{ inputs.version }}'
|
||||||
|
fi
|
||||||
|
echo "version=$v" >> "$GITHUB_OUTPUT"
|
||||||
|
echo "Resolved version: '$v'"
|
||||||
|
|
||||||
|
- name: Verify version consistency
|
||||||
|
run: |
|
||||||
|
set -e
|
||||||
|
V='${{ steps.ver.outputs.version }}'
|
||||||
|
R=$(echo "$V" | sed 's/\./\\./g')
|
||||||
|
grep -q "^${R}$" CHANGELOG.md
|
||||||
|
grep -qF "\"fzf ${V}\"" man/man1/fzf.1
|
||||||
|
grep -qF "\"fzf ${V}\"" man/man1/fzf-tmux.1
|
||||||
|
grep -qF "${V}" install
|
||||||
|
grep -qF "${V}" install.ps1
|
||||||
|
|
||||||
|
- name: Extract release notes
|
||||||
|
run: |
|
||||||
|
set -e
|
||||||
|
mkdir -p tmp
|
||||||
|
V='${{ steps.ver.outputs.version }}'
|
||||||
|
R=$(echo "$V" | sed 's/\./\\./g')
|
||||||
|
sed -n "/^${R}$/,/^[0-9]/p" CHANGELOG.md \
|
||||||
|
| tail -r | sed '1,/^ *$/d' | tail -r | sed '1,2d' \
|
||||||
|
| tee tmp/release-note
|
||||||
|
|
||||||
|
- name: Run goreleaser
|
||||||
|
uses: goreleaser/goreleaser-action@v7
|
||||||
|
with:
|
||||||
|
version: latest
|
||||||
|
args: >-
|
||||||
|
${{ github.event_name == 'push'
|
||||||
|
&& 'release --clean --release-notes tmp/release-note'
|
||||||
|
|| 'release --snapshot --clean --skip=publish' }}
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.RELEASE_PAT }}
|
||||||
|
MACOS_SIGN_P12: ${{ secrets.MACOS_SIGN_P12 }}
|
||||||
|
MACOS_SIGN_PASSWORD: ${{ secrets.MACOS_SIGN_PASSWORD }}
|
||||||
|
MACOS_NOTARY_ISSUER_ID: ${{ secrets.MACOS_NOTARY_ISSUER_ID }}
|
||||||
|
MACOS_NOTARY_KEY_ID: ${{ secrets.MACOS_NOTARY_KEY_ID }}
|
||||||
|
MACOS_NOTARY_KEY: ${{ secrets.MACOS_NOTARY_KEY }}
|
||||||
@@ -2,6 +2,12 @@ name: Publish to Winget
|
|||||||
on:
|
on:
|
||||||
release:
|
release:
|
||||||
types: [released]
|
types: [released]
|
||||||
|
workflow_dispatch:
|
||||||
|
inputs:
|
||||||
|
release-tag:
|
||||||
|
description: 'Release tag to submit (e.g. v0.73.1)'
|
||||||
|
required: true
|
||||||
|
type: string
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
publish:
|
publish:
|
||||||
@@ -10,5 +16,6 @@ jobs:
|
|||||||
- uses: vedantmgoyal2009/winget-releaser@4ffc7888bffd451b357355dc214d43bb9f23917e # v2
|
- uses: vedantmgoyal2009/winget-releaser@4ffc7888bffd451b357355dc214d43bb9f23917e # v2
|
||||||
with:
|
with:
|
||||||
identifier: junegunn.fzf
|
identifier: junegunn.fzf
|
||||||
|
release-tag: ${{ inputs.release-tag || github.event.release.tag_name }}
|
||||||
installers-regex: '-windows_(armv7|arm64|amd64)\.zip$'
|
installers-regex: '-windows_(armv7|arm64|amd64)\.zip$'
|
||||||
token: ${{ secrets.WINGET_TOKEN }}
|
token: ${{ secrets.WINGET_TOKEN }}
|
||||||
|
|||||||
+20
-5
@@ -1,11 +1,21 @@
|
|||||||
CHANGELOG
|
CHANGELOG
|
||||||
=========
|
=========
|
||||||
|
|
||||||
|
0.73.1
|
||||||
|
------
|
||||||
|
- Bug fixes
|
||||||
|
- Skip `$FZF_CURRENT_ITEM` export when the item contains a NUL byte; `exec(2)` rejects the env, breaking preview and other child commands (#4806)
|
||||||
|
- Fixed O(n^2) HTTP body accumulation in `--listen`; a single ~390 KB request could block the single-threaded server for ~8 s (Michal Majchrowicz, Marcin Wyczechowski, AFINE Team)
|
||||||
|
|
||||||
0.73.0
|
0.73.0
|
||||||
------
|
------
|
||||||
- Timer-driven `every(N)` event for `--bind`, where `N` is seconds (fractional, floored to `0.01`). Ticks that overlap an in-flight action are coalesced, so a slow `reload` cannot accumulate a backlog.
|
_Release highlights: https://junegunn.github.io/fzf/releases/0.73.0/_
|
||||||
- New `FZF_CURRENT_ITEM` environment variable exported to child processes, holding the text of the current item. Useful on shells where quoting `{}` is awkward (e.g. PowerShell on Windows). Unset when the list is empty (#4802).
|
|
||||||
- New `FZF_IDLE_TIME` (whole seconds) and `FZF_IDLE_TIME_MS` (milliseconds) environment variables exported to child processes, holding the elapsed time since the last user activity. Pair with `every(N)` to build idle-based behavior such as auto-accept or auto-quit (#1211).
|
- Nushell integration via `fzf --nushell` and the installer (#4630) (@sim590)
|
||||||
|
- New `--preview-window=next` position that places the preview adjacent to the input section, on the list side: above the input in the default layout, below it in `--layout=reverse` (#4798)
|
||||||
|
- Timer-driven `every(N)` event for `--bind`, where `N` is seconds
|
||||||
|
- Added `$FZF_IDLE_TIME` (whole seconds) and `$FZF_IDLE_TIME_MS` (milliseconds), holding the elapsed time since the last user activity
|
||||||
|
- Pair with `every(N)` to build idle-based behavior such as auto-accept or auto-quit (#1211)
|
||||||
```sh
|
```sh
|
||||||
# Live process list; --track --id-nth 2 keeps the cursor on the same PID across reloads
|
# Live process list; --track --id-nth 2 keeps the cursor on the same PID across reloads
|
||||||
fzf --header-lines 1 --track --id-nth 2 --bind 'start,every(2):reload-sync:ps -ef'
|
fzf --header-lines 1 --track --id-nth 2 --bind 'start,every(2):reload-sync:ps -ef'
|
||||||
@@ -17,9 +27,14 @@ CHANGELOG
|
|||||||
else echo accept
|
else echo accept
|
||||||
fi'
|
fi'
|
||||||
```
|
```
|
||||||
- New `--preview-window=next` position that places the preview adjacent to the input section, on the list side: above the input in the default layout, below it in `--layout=reverse` (#4798).
|
- Added `$FZF_CURRENT_ITEM` for shells where quoting `{}` is awkward (#4802)
|
||||||
- Bug fixes
|
- Bug fixes
|
||||||
- `change-preview-window` no longer resets `wrap` / `wrap-word` state set via `toggle-preview-wrap` / `toggle-preview-wrap-word`. Layout fields still snap to the preset, so cycling and the empty-token reset behave as before. The new spec can still override by including `wrap` or `nowrap` explicitly. (#4791)
|
- Scoring: non-word characters at the start of input or after a delimiter now receive the same boundary bonus as word characters (#4795)
|
||||||
|
- `change-preview-window` no longer resets `wrap` / `wrap-word` state set via `toggle-preview-wrap` / `toggle-preview-wrap-word` (#4791)
|
||||||
|
- Stripped UTF-8-encoded C1 control characters from rendered items to prevent terminal control-sequence injection
|
||||||
|
- Fixed integer-overflow panic in `FuzzyMatchV2` on 32-bit builds (Michal Majchrowicz, Marcin Wyczechowski, AFINE Team)
|
||||||
|
- Fixed `bg-transform` `reload` / `exclude` payloads being dropped
|
||||||
|
- Fixed rendering glitch with preview window on the left combined with footer
|
||||||
|
|
||||||
0.72.0
|
0.72.0
|
||||||
------
|
------
|
||||||
|
|||||||
@@ -117,6 +117,19 @@ generate:
|
|||||||
build:
|
build:
|
||||||
goreleaser build --clean --snapshot --skip=post-hooks
|
goreleaser build --clean --snapshot --skip=post-hooks
|
||||||
|
|
||||||
|
prerelease:
|
||||||
|
# Check if version numbers are properly updated
|
||||||
|
grep -q ^$(VERSION_REGEX)$$ CHANGELOG.md
|
||||||
|
grep -qF '"fzf $(VERSION_TRIM)"' man/man1/fzf.1
|
||||||
|
grep -qF '"fzf $(VERSION_TRIM)"' man/man1/fzf-tmux.1
|
||||||
|
grep -qF $(VERSION) install
|
||||||
|
grep -qF $(VERSION) install.ps1
|
||||||
|
@echo "OK: all files consistent at $(VERSION)"
|
||||||
|
|
||||||
|
tag: prerelease
|
||||||
|
git tag -s v$(VERSION) -m v$(VERSION)
|
||||||
|
git push origin v$(VERSION)
|
||||||
|
|
||||||
release:
|
release:
|
||||||
# Make sure that the tests pass and the build works
|
# Make sure that the tests pass and the build works
|
||||||
TAGS=tcell make test
|
TAGS=tcell make test
|
||||||
@@ -206,4 +219,4 @@ update:
|
|||||||
$(GO) get -u
|
$(GO) get -u
|
||||||
$(GO) mod tidy
|
$(GO) mod tidy
|
||||||
|
|
||||||
.PHONY: all generate build release test itest bench lint install clean docker docker-test update fmt
|
.PHONY: all generate build prerelease tag release test itest bench lint install clean docker docker-test update fmt
|
||||||
|
|||||||
@@ -25,22 +25,22 @@
|
|||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
fzf is a general-purpose command-line fuzzy finder.
|
fzf is a general-purpose command-line fuzzy finder and an interactive terminal toolkit.
|
||||||
|
|
||||||
<img src="https://raw.githubusercontent.com/junegunn/i/master/fzf-preview.png" width=640>
|
<img src="https://raw.githubusercontent.com/junegunn/i/master/fzf-preview.png" width=640>
|
||||||
|
|
||||||
It's an interactive filter program for any kind of list; files, command
|
Whether you're selecting files, browsing command history, previewing data,
|
||||||
history, processes, hostnames, bookmarks, git commits, etc. It implements
|
navigating complex datasets with fuzzy matching, or creating custom menus and
|
||||||
a "fuzzy" matching algorithm, so you can quickly type in patterns with omitted
|
workflows, fzf provides the building blocks to turn shell scripts into rich
|
||||||
characters and still get the results you want.
|
terminal applications.
|
||||||
|
|
||||||
Highlights
|
Highlights
|
||||||
----------
|
----------
|
||||||
|
|
||||||
- **Portable** -- Distributed as a single binary for easy installation
|
- **Portable** // Distributed as a single binary for easy installation
|
||||||
- **Fast** -- Optimized to process millions of items instantly
|
- **Fast** // Optimized to process millions of items in milliseconds
|
||||||
- **Versatile** -- Fully customizable through an event-action binding mechanism
|
- **Programmable** // Event-driven architecture for building custom terminal interfaces and workflows
|
||||||
- **All-inclusive** -- Comes with integrations for Bash, Zsh, Fish, Nushell, Vim, and Neovim
|
- **Batteries-included** // Comes with integrations for Bash, Zsh, Fish, Nushell, Vim, and Neovim
|
||||||
|
|
||||||
Table of Contents
|
Table of Contents
|
||||||
-----------------
|
-----------------
|
||||||
@@ -533,15 +533,16 @@ the following key bindings in bash, zsh, fish, and Nushell.
|
|||||||
```
|
```
|
||||||
- Can be disabled by setting `FZF_CTRL_T_COMMAND` to an empty string when
|
- Can be disabled by setting `FZF_CTRL_T_COMMAND` to an empty string when
|
||||||
sourcing the script
|
sourcing the script
|
||||||
- `CTRL-R` - Paste the selected command from history onto the command-line. With fish shell, it is possible to select multiple commands.
|
- `CTRL-R` - Paste the selected command from history onto the command-line.
|
||||||
|
- Select multiple commands with `TAB`.
|
||||||
- If you want to see the commands in chronological order, press `CTRL-R`
|
- If you want to see the commands in chronological order, press `CTRL-R`
|
||||||
again which toggles sorting by relevance
|
again which toggles sorting by relevance
|
||||||
- Press `ALT-R` to toggle "raw" mode where you can see the surrounding items
|
- Press `ALT-R` to toggle "raw" mode where you can see the surrounding items
|
||||||
of a match. In this mode, you can press `CTRL-N` and `CTRL-P` to move
|
of a match. In this mode, you can press `CTRL-N` and `CTRL-P` to move
|
||||||
between the matching items only.
|
between the matching items only.
|
||||||
- Press `CTRL-/` or `ALT-/` to toggle line wrapping
|
- Press `CTRL-/` or `ALT-/` to toggle line wrapping
|
||||||
|
- Press `SHIFT-DELETE` to delete the selected commands (bash and fish)
|
||||||
- Fish shell only:
|
- Fish shell only:
|
||||||
- Press `SHIFT-DELETE` to delete the selected commands
|
|
||||||
- Press `ALT-ENTER` to reformat and insert the selected commands
|
- Press `ALT-ENTER` to reformat and insert the selected commands
|
||||||
- Press `ALT-T` to cycle through command prefix (timestamp, date/time, none)
|
- Press `ALT-T` to cycle through command prefix (timestamp, date/time, none)
|
||||||
- Set `FZF_CTRL_R_OPTS` to pass additional options to fzf
|
- Set `FZF_CTRL_R_OPTS` to pass additional options to fzf
|
||||||
|
|||||||
+54
@@ -0,0 +1,54 @@
|
|||||||
|
Release process
|
||||||
|
===============
|
||||||
|
|
||||||
|
Building, signing, notarizing, and publishing is handled by
|
||||||
|
[`.github/workflows/release.yml`](.github/workflows/release.yml),
|
||||||
|
triggered by a tag push.
|
||||||
|
|
||||||
|
## Steps
|
||||||
|
|
||||||
|
1. Update version in the following files and commit on `master`:
|
||||||
|
- `CHANGELOG.md`
|
||||||
|
- `main.go`
|
||||||
|
- `install`
|
||||||
|
- `install.ps1`
|
||||||
|
- `man/man1/fzf.1`
|
||||||
|
- `man/man1/fzf-tmux.1`
|
||||||
|
|
||||||
|
2. Verify file consistency, sign the tag, and push the tag.
|
||||||
|
|
||||||
|
```sh
|
||||||
|
make tag VERSION=0.73.1
|
||||||
|
```
|
||||||
|
|
||||||
|
`make tag` runs `prerelease` first (checks that the version
|
||||||
|
appears in CHANGELOG.md, both man pages, install, and install.ps1)
|
||||||
|
and only signs + pushes the tag if the checks pass.
|
||||||
|
|
||||||
|
Only the tag is pushed; `master` on origin still points to the
|
||||||
|
old version, so `/master/install` keeps resolving against existing
|
||||||
|
binaries during the publish window.
|
||||||
|
|
||||||
|
3. The workflow fires on the tag push and pauses on the `release`
|
||||||
|
environment gate. Approve it in the Actions tab to release.
|
||||||
|
|
||||||
|
4. After the GitHub release is published, fast-forward `master`:
|
||||||
|
|
||||||
|
```sh
|
||||||
|
git push origin master
|
||||||
|
```
|
||||||
|
|
||||||
|
## Testing the workflow
|
||||||
|
|
||||||
|
To exercise the workflow without firing a real release:
|
||||||
|
|
||||||
|
1. Actions tab -> **Release** -> **Run workflow**.
|
||||||
|
2. Pick a branch and enter the version currently on that branch
|
||||||
|
(the version-consistency check requires the input to match the
|
||||||
|
files in the checked-out tree).
|
||||||
|
3. Approve the `release` environment gate when prompted.
|
||||||
|
4. Goreleaser runs with `--snapshot --skip=publish`. Signing and
|
||||||
|
notarization run; only the GitHub release upload is skipped.
|
||||||
|
|
||||||
|
Use this to validate the workflow YAML, version-extraction logic,
|
||||||
|
the macOS runner setup, and the signing/notarization credentials.
|
||||||
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
set -u
|
set -u
|
||||||
|
|
||||||
version=0.72.0
|
version=0.73.1
|
||||||
auto_completion=
|
auto_completion=
|
||||||
key_bindings=
|
key_bindings=
|
||||||
update_config=2
|
update_config=2
|
||||||
@@ -10,7 +10,6 @@ shells="bash zsh fish nushell"
|
|||||||
prefix='~/.fzf'
|
prefix='~/.fzf'
|
||||||
prefix_expand=~/.fzf
|
prefix_expand=~/.fzf
|
||||||
fish_dir=${XDG_CONFIG_HOME:-$HOME/.config}/fish
|
fish_dir=${XDG_CONFIG_HOME:-$HOME/.config}/fish
|
||||||
nushell_autoload_dir=${XDG_CONFIG_HOME:-$HOME/.config}/nushell/autoload
|
|
||||||
|
|
||||||
help() {
|
help() {
|
||||||
cat << EOF
|
cat << EOF
|
||||||
@@ -253,10 +252,10 @@ fi
|
|||||||
|
|
||||||
echo
|
echo
|
||||||
for shell in $shells; do
|
for shell in $shells; do
|
||||||
|
[[ $shell == nushell ]] && continue
|
||||||
fzf_completion="source \"$fzf_base/shell/completion.${shell}\""
|
fzf_completion="source \"$fzf_base/shell/completion.${shell}\""
|
||||||
fzf_key_bindings="source \"$fzf_base/shell/key-bindings.${shell}\""
|
fzf_key_bindings="source \"$fzf_base/shell/key-bindings.${shell}\""
|
||||||
[[ $shell == fish ]] && continue
|
[[ $shell == fish ]] && continue
|
||||||
[[ $shell == nushell ]] && continue
|
|
||||||
src=${prefix_expand}.${shell}
|
src=${prefix_expand}.${shell}
|
||||||
echo -n "Generate $src ... "
|
echo -n "Generate $src ... "
|
||||||
|
|
||||||
@@ -446,14 +445,16 @@ fi
|
|||||||
if [[ "$shells" =~ nushell ]]; then
|
if [[ "$shells" =~ nushell ]]; then
|
||||||
if [[ $key_bindings -eq 1 || $auto_completion -eq 1 ]]; then
|
if [[ $key_bindings -eq 1 || $auto_completion -eq 1 ]]; then
|
||||||
echo "Setting up Nushell integration ..."
|
echo "Setting up Nushell integration ..."
|
||||||
|
nushell_autoload_dir=$(nu -c '$nu.user-autoload-dirs | first')
|
||||||
mkdir -p "$nushell_autoload_dir"
|
mkdir -p "$nushell_autoload_dir"
|
||||||
echo -n " Generate _fzf_integration.nu ... "
|
dest="$nushell_autoload_dir/_fzf_integration.nu"
|
||||||
|
echo -n " Generate $dest ... "
|
||||||
if [[ $key_bindings -eq 1 && $auto_completion -eq 1 ]]; then
|
if [[ $key_bindings -eq 1 && $auto_completion -eq 1 ]]; then
|
||||||
"$fzf_base"/bin/fzf --nushell > "$nushell_autoload_dir/_fzf_integration.nu"
|
"$fzf_base"/bin/fzf --nushell > "$dest"
|
||||||
elif [[ $key_bindings -eq 1 ]]; then
|
elif [[ $key_bindings -eq 1 ]]; then
|
||||||
cp "$fzf_base/shell/key-bindings.nu" "$nushell_autoload_dir/_fzf_integration.nu"
|
cp "$fzf_base/shell/key-bindings.nu" "$dest"
|
||||||
else
|
else
|
||||||
cp "$fzf_base/shell/completion.nu" "$nushell_autoload_dir/_fzf_integration.nu"
|
cp "$fzf_base/shell/completion.nu" "$dest"
|
||||||
fi
|
fi
|
||||||
echo "OK"
|
echo "OK"
|
||||||
echo
|
echo
|
||||||
|
|||||||
+1
-1
@@ -1,4 +1,4 @@
|
|||||||
$version="0.72.0"
|
$version="0.73.1"
|
||||||
|
|
||||||
$fzf_base=Split-Path -Parent $MyInvocation.MyCommand.Definition
|
$fzf_base=Split-Path -Parent $MyInvocation.MyCommand.Definition
|
||||||
|
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ import (
|
|||||||
"github.com/junegunn/fzf/src/protector"
|
"github.com/junegunn/fzf/src/protector"
|
||||||
)
|
)
|
||||||
|
|
||||||
var version = "0.72"
|
var version = "0.73"
|
||||||
var revision = "devel"
|
var revision = "devel"
|
||||||
|
|
||||||
//go:embed shell/key-bindings.bash
|
//go:embed shell/key-bindings.bash
|
||||||
|
|||||||
+1
-1
@@ -21,7 +21,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|||||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||||
THE SOFTWARE.
|
THE SOFTWARE.
|
||||||
..
|
..
|
||||||
.TH fzf\-tmux 1 "Apr 2026" "fzf 0.72.0" "fzf\-tmux - open fzf in tmux split pane"
|
.TH fzf\-tmux 1 "May 2026" "fzf 0.73.1" "fzf\-tmux - open fzf in tmux split pane"
|
||||||
|
|
||||||
.SH NAME
|
.SH NAME
|
||||||
fzf\-tmux - open fzf in tmux split pane
|
fzf\-tmux - open fzf in tmux split pane
|
||||||
|
|||||||
+5
-1
@@ -21,7 +21,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|||||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||||
THE SOFTWARE.
|
THE SOFTWARE.
|
||||||
..
|
..
|
||||||
.TH fzf 1 "Apr 2026" "fzf 0.72.0" "fzf - a command-line fuzzy finder"
|
.TH fzf 1 "May 2026" "fzf 0.73.1" "fzf - a command-line fuzzy finder"
|
||||||
|
|
||||||
.SH NAME
|
.SH NAME
|
||||||
fzf - a command-line fuzzy finder
|
fzf - a command-line fuzzy finder
|
||||||
@@ -1531,6 +1531,10 @@ fzf exports the following environment variables to its child processes.
|
|||||||
.br
|
.br
|
||||||
.BR FZF_RAW " Only in raw mode. 1 if the current item matches, 0 otherwise"
|
.BR FZF_RAW " Only in raw mode. 1 if the current item matches, 0 otherwise"
|
||||||
|
|
||||||
|
.PP
|
||||||
|
.B FZF_CURRENT_ITEM
|
||||||
|
is omitted when the item contains a NUL byte, because exec(2) cannot pass it.
|
||||||
|
|
||||||
.SH EXTENDED SEARCH MODE
|
.SH EXTENDED SEARCH MODE
|
||||||
|
|
||||||
Unless specified otherwise, fzf will start in "extended\-search mode". In this
|
Unless specified otherwise, fzf will start in "extended\-search mode". In this
|
||||||
|
|||||||
+2
-2
@@ -39,7 +39,7 @@ $env.FZF_COMPLETION_DIR_COMMANDS = $env.FZF_COMPLETION_DIR_COMMANDS? | default [
|
|||||||
# --- Helper Functions ---
|
# --- Helper Functions ---
|
||||||
|
|
||||||
# Helper to build default fzf options list
|
# Helper to build default fzf options list
|
||||||
def __fzf_defaults [prepend: string, append: string]: nothing -> string {
|
def __fzf_defaults_completion [prepend: string, append: string]: nothing -> string {
|
||||||
let base = $"--height ($env.FZF_TMUX_HEIGHT? | default '40%') --min-height 20+ --bind=ctrl-z:ignore ($prepend)"
|
let base = $"--height ($env.FZF_TMUX_HEIGHT? | default '40%') --min-height 20+ --bind=ctrl-z:ignore ($prepend)"
|
||||||
let opts_file = if ($env.FZF_DEFAULT_OPTS_FILE? | default '' | is-not-empty) {
|
let opts_file = if ($env.FZF_DEFAULT_OPTS_FILE? | default '' | is-not-empty) {
|
||||||
try { open --raw ($env.FZF_DEFAULT_OPTS_FILE) | str trim } catch { '' }
|
try { open --raw ($env.FZF_DEFAULT_OPTS_FILE) | str trim } catch { '' }
|
||||||
@@ -62,7 +62,7 @@ def __fzf_comprun [ context_name: string # e.g., "fzf-completion" , "fzf-h
|
|||||||
null # Set to null if there's no stdin or an error occurs reading it
|
null # Set to null if there's no stdin or an error occurs reading it
|
||||||
}
|
}
|
||||||
|
|
||||||
let fzf_default_opts = (__fzf_defaults "" ($env.FZF_COMPLETION_OPTS | default ''))
|
let fzf_default_opts = (__fzf_defaults_completion "" ($env.FZF_COMPLETION_OPTS | default ''))
|
||||||
let fzf_prefinal_opt = ['--query', $query, '--reverse'] | append $fzf_opts_arg
|
let fzf_prefinal_opt = ['--query', $query, '--reverse'] | append $fzf_opts_arg
|
||||||
|
|
||||||
# Get the configured height, defaulting to '40%'
|
# Get the configured height, defaulting to '40%'
|
||||||
|
|||||||
+5
-1
@@ -4,6 +4,7 @@ package fzf
|
|||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"maps"
|
"maps"
|
||||||
|
"math"
|
||||||
"os"
|
"os"
|
||||||
"sync"
|
"sync"
|
||||||
"time"
|
"time"
|
||||||
@@ -241,6 +242,9 @@ func Run(opts *Options) (int, error) {
|
|||||||
denylist = make(map[int32]struct{})
|
denylist = make(map[int32]struct{})
|
||||||
denyMutex.Unlock()
|
denyMutex.Unlock()
|
||||||
}
|
}
|
||||||
|
if opts.HeaderLines > math.MaxInt32 {
|
||||||
|
opts.HeaderLines = math.MaxInt32
|
||||||
|
}
|
||||||
headerLines := int32(opts.HeaderLines)
|
headerLines := int32(opts.HeaderLines)
|
||||||
headerUpdated := false
|
headerUpdated := false
|
||||||
patternBuilder := func(runes []rune) *Pattern {
|
patternBuilder := func(runes []rune) *Pattern {
|
||||||
@@ -467,7 +471,7 @@ func Run(opts *Options) (int, error) {
|
|||||||
terminal.UpdateCount(max(0, total-int(headerLines)), !reading, value.(*string))
|
terminal.UpdateCount(max(0, total-int(headerLines)), !reading, value.(*string))
|
||||||
if headerLines > 0 && !headerUpdated {
|
if headerLines > 0 && !headerUpdated {
|
||||||
terminal.UpdateHeader(GetItems(snapshot, int(headerLines)))
|
terminal.UpdateHeader(GetItems(snapshot, int(headerLines)))
|
||||||
headerUpdated = int32(total) >= headerLines
|
headerUpdated = total >= int(headerLines)
|
||||||
}
|
}
|
||||||
if heightUnknown && !deferred {
|
if heightUnknown && !deferred {
|
||||||
determine(!reading)
|
determine(!reading)
|
||||||
|
|||||||
+4
-3
@@ -153,7 +153,7 @@ func startHttpServer(address listenAddress, actionChannel chan []*action, getHan
|
|||||||
func (server *httpServer) handleHttpRequest(conn net.Conn) string {
|
func (server *httpServer) handleHttpRequest(conn net.Conn) string {
|
||||||
contentLength := 0
|
contentLength := 0
|
||||||
apiKey := ""
|
apiKey := ""
|
||||||
body := ""
|
var bodyBuilder strings.Builder
|
||||||
answer := func(code string, message string) string {
|
answer := func(code string, message string) string {
|
||||||
message += "\n"
|
message += "\n"
|
||||||
return code + fmt.Sprintf("Content-Length: %d%s", len(message), crlf+crlf+message)
|
return code + fmt.Sprintf("Content-Length: %d%s", len(message), crlf+crlf+message)
|
||||||
@@ -175,7 +175,7 @@ func (server *httpServer) handleHttpRequest(conn net.Conn) string {
|
|||||||
token := data[:found+len(crlf)]
|
token := data[:found+len(crlf)]
|
||||||
return len(token), token, nil
|
return len(token), token, nil
|
||||||
}
|
}
|
||||||
if atEOF || len(body)+len(data) >= contentLength {
|
if atEOF || bodyBuilder.Len()+len(data) >= contentLength {
|
||||||
return 0, data, bufio.ErrFinalToken
|
return 0, data, bufio.ErrFinalToken
|
||||||
}
|
}
|
||||||
return 0, nil, nil
|
return 0, nil, nil
|
||||||
@@ -218,7 +218,7 @@ Loop:
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
case 2: // Request body
|
case 2: // Request body
|
||||||
body += text
|
bodyBuilder.WriteString(text)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -234,6 +234,7 @@ Loop:
|
|||||||
return answer(httpUnavailable+jsonContentType, `{"error":"timeout"}`)
|
return answer(httpUnavailable+jsonContentType, `{"error":"timeout"}`)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
body := bodyBuilder.String()
|
||||||
if len(body) < contentLength {
|
if len(body) < contentLength {
|
||||||
return bad("incomplete request")
|
return bad("incomplete request")
|
||||||
}
|
}
|
||||||
|
|||||||
+5
-2
@@ -1439,7 +1439,10 @@ func (t *Terminal) environImpl(forPreview bool) []string {
|
|||||||
env = append(env, fmt.Sprintf("FZF_COLUMNS=%d", t.areaColumns))
|
env = append(env, fmt.Sprintf("FZF_COLUMNS=%d", t.areaColumns))
|
||||||
env = append(env, fmt.Sprintf("FZF_POS=%d", min(t.merger.Length(), t.cy+1)))
|
env = append(env, fmt.Sprintf("FZF_POS=%d", min(t.merger.Length(), t.cy+1)))
|
||||||
if item := t.currentItem(); item != nil {
|
if item := t.currentItem(); item != nil {
|
||||||
env = append(env, "FZF_CURRENT_ITEM="+item.AsString(t.ansi))
|
// Skip if the value contains a NUL byte; exec(2) would reject the env.
|
||||||
|
if s := item.AsString(t.ansi); !strings.ContainsRune(s, 0) {
|
||||||
|
env = append(env, "FZF_CURRENT_ITEM="+s)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
env = append(env, fmt.Sprintf("FZF_CLICK_HEADER_LINE=%d", t.clickHeaderLine))
|
env = append(env, fmt.Sprintf("FZF_CLICK_HEADER_LINE=%d", t.clickHeaderLine))
|
||||||
env = append(env, fmt.Sprintf("FZF_CLICK_HEADER_COLUMN=%d", t.clickHeaderColumn))
|
env = append(env, fmt.Sprintf("FZF_CLICK_HEADER_COLUMN=%d", t.clickHeaderColumn))
|
||||||
@@ -6826,7 +6829,7 @@ func (t *Terminal) Loop() error {
|
|||||||
changed = true
|
changed = true
|
||||||
// Deselect items that are now part of the header
|
// Deselect items that are now part of the header
|
||||||
for idx := range t.selected {
|
for idx := range t.selected {
|
||||||
if idx < int32(n) {
|
if int(idx) < n {
|
||||||
delete(t.selected, idx)
|
delete(t.selected, idx)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -114,7 +114,11 @@ if [ -d "${fish_dir}/functions" ]; then
|
|||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
nushell_autoload_dir=${XDG_CONFIG_HOME:-$HOME/.config}/nushell/autoload
|
if command -v nu > /dev/null; then
|
||||||
|
nushell_autoload_dir=$(nu -c '$nu.user-autoload-dirs | first')
|
||||||
|
else
|
||||||
|
nushell_autoload_dir=${XDG_CONFIG_HOME:-$HOME/.config}/nushell/autoload
|
||||||
|
fi
|
||||||
remove "${nushell_autoload_dir}/_fzf_integration.nu"
|
remove "${nushell_autoload_dir}/_fzf_integration.nu"
|
||||||
|
|
||||||
config_dir=$(dirname "$prefix_expand")
|
config_dir=$(dirname "$prefix_expand")
|
||||||
|
|||||||
Reference in New Issue
Block a user