Showing preview only (1,584K chars total). Download the full file or copy to clipboard to get everything.
Repository: junegunn/fzf
Branch: master
Commit: f0a2f5ef145e
Files: 144
Total size: 1.5 MB
Directory structure:
gitextract_7059u6i9/
├── .editorconfig
├── .github/
│ ├── FUNDING.yml
│ ├── ISSUE_TEMPLATE/
│ │ └── issue_template.yml
│ ├── dependabot.yml
│ ├── labeler.yml
│ └── workflows/
│ ├── codeql-analysis.yml
│ ├── depsreview.yaml
│ ├── labeler.yml
│ ├── linux.yml
│ ├── macos.yml
│ ├── sponsors.yml
│ ├── typos.yml
│ └── winget.yml
├── .gitignore
├── .goreleaser.yml
├── .rubocop.yml
├── .tool-versions
├── ADVANCED.md
├── BUILD.md
├── CHANGELOG.md
├── Dockerfile
├── Gemfile
├── LICENSE
├── Makefile
├── README-VIM.md
├── README.md
├── SECURITY.md
├── bin/
│ ├── fzf-preview.sh
│ └── fzf-tmux
├── doc/
│ └── fzf.txt
├── go.mod
├── go.sum
├── install
├── install.ps1
├── main.go
├── man/
│ └── man1/
│ ├── fzf-tmux.1
│ └── fzf.1
├── plugin/
│ └── fzf.vim
├── shell/
│ ├── common.fish
│ ├── common.sh
│ ├── completion.bash
│ ├── completion.fish
│ ├── completion.zsh
│ ├── key-bindings.bash
│ ├── key-bindings.fish
│ ├── key-bindings.zsh
│ └── update.sh
├── src/
│ ├── LICENSE
│ ├── actiontype_string.go
│ ├── algo/
│ │ ├── SIMD.md
│ │ ├── algo.go
│ │ ├── algo_test.go
│ │ ├── indexbyte2_amd64.go
│ │ ├── indexbyte2_amd64.s
│ │ ├── indexbyte2_arm64.go
│ │ ├── indexbyte2_arm64.s
│ │ ├── indexbyte2_other.go
│ │ ├── indexbyte2_test.go
│ │ └── normalize.go
│ ├── ansi.go
│ ├── ansi_test.go
│ ├── cache.go
│ ├── cache_test.go
│ ├── chunklist.go
│ ├── chunklist_test.go
│ ├── constants.go
│ ├── core.go
│ ├── functions.go
│ ├── history.go
│ ├── history_test.go
│ ├── item.go
│ ├── item_test.go
│ ├── matcher.go
│ ├── merger.go
│ ├── merger_test.go
│ ├── options.go
│ ├── options_no_pprof.go
│ ├── options_pprof.go
│ ├── options_pprof_test.go
│ ├── options_test.go
│ ├── pattern.go
│ ├── pattern_test.go
│ ├── protector/
│ │ ├── protector.go
│ │ └── protector_openbsd.go
│ ├── proxy.go
│ ├── proxy_unix.go
│ ├── proxy_windows.go
│ ├── reader.go
│ ├── reader_test.go
│ ├── result.go
│ ├── result_others.go
│ ├── result_test.go
│ ├── result_x86.go
│ ├── server.go
│ ├── terminal.go
│ ├── terminal_test.go
│ ├── terminal_unix.go
│ ├── terminal_windows.go
│ ├── tmux.go
│ ├── tokenizer.go
│ ├── tokenizer_test.go
│ ├── tui/
│ │ ├── dummy.go
│ │ ├── eventtype_string.go
│ │ ├── light.go
│ │ ├── light_test.go
│ │ ├── light_unix.go
│ │ ├── light_windows.go
│ │ ├── tcell.go
│ │ ├── tcell_test.go
│ │ ├── ttyname_unix.go
│ │ ├── ttyname_windows.go
│ │ ├── tui.go
│ │ └── tui_test.go
│ ├── util/
│ │ ├── atexit.go
│ │ ├── atexit_test.go
│ │ ├── atomicbool.go
│ │ ├── atomicbool_test.go
│ │ ├── chars.go
│ │ ├── chars_test.go
│ │ ├── concurrent_set.go
│ │ ├── eventbox.go
│ │ ├── eventbox_test.go
│ │ ├── slab.go
│ │ ├── util.go
│ │ ├── util_test.go
│ │ ├── util_unix.go
│ │ └── util_windows.go
│ ├── winpty.go
│ └── winpty_windows.go
├── test/
│ ├── lib/
│ │ ├── common.fish
│ │ ├── common.rb
│ │ └── common.sh
│ ├── runner.rb
│ ├── test_core.rb
│ ├── test_exec.rb
│ ├── test_filter.rb
│ ├── test_layout.rb
│ ├── test_preview.rb
│ ├── test_raw.rb
│ ├── test_server.rb
│ ├── test_shell_integration.rb
│ └── vim/
│ └── fzf.vader
├── typos.toml
└── uninstall
================================================
FILE CONTENTS
================================================
================================================
FILE: .editorconfig
================================================
root = true
[*.{sh,bash}]
indent_style = space
indent_size = 2
simplify = true
binary_next_line = false
switch_case_indent = true
space_redirects = true
function_next_line = false
# also bash scripts.
[{install,uninstall,bin/fzf-preview.sh,bin/fzf-tmux}]
indent_style = space
indent_size = 2
simplify = true
binary_next_line = false
switch_case_indent = true
space_redirects = true
function_next_line = false
================================================
FILE: .github/FUNDING.yml
================================================
github: junegunn
================================================
FILE: .github/ISSUE_TEMPLATE/issue_template.yml
================================================
---
name: Issue Template
description: Report a problem or bug related to fzf to help us improve
body:
- type: markdown
attributes:
value: ISSUES NOT FOLLOWING THIS TEMPLATE WILL BE CLOSED AND DELETED
- type: checkboxes
attributes:
label: Checklist
options:
- label: I have read through the manual page (`man fzf`)
required: true
- label: I have searched through the existing issues
required: true
- label: For bug reports, I have checked if the bug is reproducible in the latest version of fzf
required: false
- type: input
attributes:
label: Output of `fzf --version`
placeholder: e.g. 0.48.1 (d579e33)
validations:
required: true
- type: checkboxes
attributes:
label: OS
options:
- label: Linux
- label: macOS
- label: Windows
- label: Etc.
- type: checkboxes
attributes:
label: Shell
options:
- label: bash
- label: zsh
- label: fish
- type: textarea
attributes:
label: Problem / Steps to reproduce
validations:
required: true
================================================
FILE: .github/dependabot.yml
================================================
version: 2
updates:
- package-ecosystem: "gomod"
directory: "/"
schedule:
interval: "weekly"
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly"
================================================
FILE: .github/labeler.yml
================================================
go:
- changed-files:
- any-glob-to-any-file:
- src/**
- main.go
- go.mod
- go.sum
shell:
- changed-files:
- any-glob-to-any-file:
- shell/**
bash:
- changed-files:
- any-glob-to-any-file:
- shell/**/*.bash
zsh:
- changed-files:
- any-glob-to-any-file:
- shell/**/*.zsh
fish:
- changed-files:
- any-glob-to-any-file:
- shell/**/*.fish
vim:
- changed-files:
- any-glob-to-any-file:
- plugin/**
docs:
- changed-files:
- any-glob-to-any-file:
- '*.md'
- doc/**
- man/**
ci:
- changed-files:
- any-glob-to-any-file:
- .github/**
build:
- changed-files:
- any-glob-to-any-file:
- Makefile
- .goreleaser.yml
- Dockerfile
test:
- changed-files:
- any-glob-to-any-file:
- test/**
- src/**/*_test.go
install:
- changed-files:
- any-glob-to-any-file:
- install
- install.ps1
- uninstall
================================================
FILE: .github/workflows/codeql-analysis.yml
================================================
# https://docs.github.com/en/free-pro-team@latest/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning
name: CodeQL
on:
push:
branches: [ master, devel ]
pull_request:
branches: [ master ]
workflow_dispatch:
permissions:
contents: read
jobs:
analyze:
permissions:
actions: read # for github/codeql-action/init to get workflow details
contents: read # for actions/checkout to fetch code
security-events: write # for github/codeql-action/autobuild to send a status report
name: Analyze
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
language: ['go']
steps:
- name: Checkout repository
uses: actions/checkout@v5
with:
fetch-depth: 0
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v4
with:
languages: ${{ matrix.language }}
- name: Autobuild
uses: github/codeql-action/autobuild@v4
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v4
================================================
FILE: .github/workflows/depsreview.yaml
================================================
name: 'Dependency Review'
on: [pull_request]
permissions:
contents: read
jobs:
dependency-review:
runs-on: ubuntu-latest
steps:
- name: 'Checkout Repository'
uses: actions/checkout@v5
- name: 'Dependency Review'
uses: actions/dependency-review-action@v4
================================================
FILE: .github/workflows/labeler.yml
================================================
name: Label PRs
on:
pull_request_target:
types: [opened, synchronize, reopened]
permissions:
contents: read
pull-requests: write
jobs:
label:
runs-on: ubuntu-latest
steps:
- uses: actions/labeler@v6
with:
configuration-path: .github/labeler.yml
================================================
FILE: .github/workflows/linux.yml
================================================
---
name: build
on:
push:
branches: [ master, devel ]
pull_request:
branches: [ master ]
workflow_dispatch:
permissions:
contents: read
env:
LANG: C.UTF-8
jobs:
build:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v5
with:
fetch-depth: 0
- name: Set up Go
uses: actions/setup-go@v6
with:
go-version: "1.23"
- name: Setup Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: 3.4.6
- name: Install packages
run: sudo apt-get install --yes zsh fish tmux shfmt
- name: Install Ruby gems
run: bundle install
- name: Rubocop
run: make lint
- name: Unit test
run: make test
- name: Fuzz test
run: |
go test ./src/algo/ -fuzz=FuzzIndexByteTwo -fuzztime=5s
go test ./src/algo/ -fuzz=FuzzLastIndexByteTwo -fuzztime=5s
- name: Integration test
run: make install && ./install --all && tmux new-session -d && ruby test/runner.rb --verbose
================================================
FILE: .github/workflows/macos.yml
================================================
---
name: Test fzf on macOS
on:
push:
branches: [ master, devel ]
pull_request:
branches: [ master ]
workflow_dispatch:
permissions:
contents: read
jobs:
build:
runs-on: macos-latest
steps:
- uses: actions/checkout@v5
with:
fetch-depth: 0
- name: Set up Go
uses: actions/setup-go@v6
with:
go-version: "1.23"
- name: Setup Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: 3.0.0
- name: Install packages
run: HOMEBREW_NO_INSTALL_CLEANUP=1 brew install fish zsh tmux shfmt
- name: Install Ruby gems
run: gem install --no-document minitest:5.14.2 rubocop:1.0.0 rubocop-minitest:0.10.1 rubocop-performance:1.8.1
- name: Rubocop
run: rubocop --require rubocop-minitest --require rubocop-performance
- name: Unit test
run: make test
- name: Integration test
run: make install && ./install --all && LC_ALL=C tmux new-session -d && ruby test/test_go.rb --verbose
================================================
FILE: .github/workflows/sponsors.yml
================================================
---
name: Generate Sponsors README
on:
workflow_dispatch:
schedule:
- cron: 0 15 * * 6
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout 🛎️
uses: actions/checkout@v5
- name: Generate Sponsors 💖
uses: JamesIves/github-sponsors-readme-action@v1
with:
token: ${{ secrets.SPONSORS_TOKEN }}
file: 'README.md'
- name: Deploy to GitHub Pages 🚀
uses: JamesIves/github-pages-deploy-action@v4
with:
branch: master
folder: '.'
================================================
FILE: .github/workflows/typos.yml
================================================
name: "Spell Check"
on: [pull_request]
jobs:
typos:
name: Spell Check with Typos
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- uses: crate-ci/typos@v1.29.4
================================================
FILE: .github/workflows/winget.yml
================================================
name: Publish to Winget
on:
release:
types: [released]
jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: vedantmgoyal2009/winget-releaser@v2
with:
identifier: junegunn.fzf
installers-regex: '-windows_(armv7|arm64|amd64)\.zip$'
token: ${{ secrets.WINGET_TOKEN }}
================================================
FILE: .gitignore
================================================
bin/fzf
bin/fzf.exe
dist
target
pkg
.DS_Store
doc/tags
vendor
gopath
*.zwc
fzf
tmp
*.patch
.idea
================================================
FILE: .goreleaser.yml
================================================
---
version: 2
project_name: fzf
before:
hooks:
- go mod download
builds:
- id: fzf
goos:
- darwin
- linux
- windows
- freebsd
- openbsd
- android
goarch:
- amd64
- arm
- arm64
- loong64
- ppc64le
- s390x
- riscv64
goarm:
- "5"
- "6"
- "7"
flags:
- -trimpath
ldflags:
- "-s -w -X main.version={{ .Version }} -X main.revision={{ .ShortCommit }}"
ignore:
- goos: freebsd
goarch: arm
- goos: openbsd
goarch: arm
- goos: freebsd
goarch: arm64
- goos: openbsd
goarch: arm64
- goos: openbsd
goarch: riscv64
- goos: android
goarch: amd64
- goos: android
goarch: arm
# .goreleaser.yaml
notarize:
macos:
- # Whether this configuration is enabled or not.
#
# Default: false.
# Templates: allowed.
enabled: "{{ not .IsSnapshot }}"
# Before notarizing, we need to sign the binary.
# This blocks defines the configuration for doing so.
sign:
# The .p12 certificate file path or its base64'd contents.
certificate: "{{.Env.MACOS_SIGN_P12}}"
# The password to be used to open the certificate.
password: "{{.Env.MACOS_SIGN_PASSWORD}}"
# Then, we notarize the binaries.
notarize:
# The issuer ID.
# Its the UUID you see when creating the App Store Connect key.
issuer_id: "{{.Env.MACOS_NOTARY_ISSUER_ID}}"
# Key ID.
# You can see it in the list of App Store Connect Keys.
# It will also be in the ApiKey filename.
key_id: "{{.Env.MACOS_NOTARY_KEY_ID}}"
# The .p8 key file path or its base64'd contents.
key: "{{.Env.MACOS_NOTARY_KEY}}"
# Whether to wait for the notarization to finish.
# Not recommended, as it could take a really long time.
wait: true
archives:
- name_template: "{{ .ProjectName }}-{{ .Version }}-{{ .Os }}_{{ .Arch }}{{ if .Arm }}v{{ .Arm }}{{ end }}"
ids:
- fzf
formats:
- tar.gz
format_overrides:
- goos: windows
formats:
- zip
files:
- non-existent*
release:
github:
owner: junegunn
name: fzf
prerelease: auto
name_template: '{{ .Version }}'
snapshot:
version_template: "{{ .Version }}-devel"
changelog:
sort: asc
filters:
exclude:
- README
- test
================================================
FILE: .rubocop.yml
================================================
AllCops:
NewCops: enable
Layout/LineLength:
Enabled: false
Metrics:
Enabled: false
Lint/ShadowingOuterLocalVariable:
Enabled: false
Lint/NestedMethodDefinition:
Enabled: false
Style/MethodCallWithArgsParentheses:
Enabled: true
AllowedMethods:
- assert
- exit
- paste
- puts
- raise
- refute
- require
- send_keys
AllowedPatterns:
- ^assert_
- ^refute_
Style/NumericPredicate:
Enabled: false
Style/StringConcatenation:
Enabled: false
Style/OptionalBooleanParameter:
Enabled: false
Style/WordArray:
MinSize: 1
Minitest/AssertEqual:
Enabled: false
Minitest/EmptyLineBeforeAssertionMethods:
Enabled: false
Naming/VariableNumber:
Enabled: false
Lint/EmptyBlock:
Enabled: false
Style/SafeNavigationChainLength:
Enabled: false
================================================
FILE: .tool-versions
================================================
golang 1.23
ruby 3.4
shfmt 3.12
================================================
FILE: ADVANCED.md
================================================
Advanced fzf examples
======================
* *Last update: 2025/02/02*
* *Requires fzf 0.59.0 or later*
---
<!-- vim-markdown-toc GFM -->
* [Introduction](#introduction)
* [Display modes](#display-modes)
* [`--height`](#--height)
* [`--tmux`](#--tmux)
* [Dynamic reloading of the list](#dynamic-reloading-of-the-list)
* [Updating the list of processes by pressing CTRL-R](#updating-the-list-of-processes-by-pressing-ctrl-r)
* [Toggling between data sources](#toggling-between-data-sources)
* [Toggling with a single key binding](#toggling-with-a-single-key-binding)
* [Ripgrep integration](#ripgrep-integration)
* [Using fzf as the secondary filter](#using-fzf-as-the-secondary-filter)
* [Using fzf as interactive Ripgrep launcher](#using-fzf-as-interactive-ripgrep-launcher)
* [Switching to fzf-only search mode](#switching-to-fzf-only-search-mode)
* [Switching between Ripgrep mode and fzf mode](#switching-between-ripgrep-mode-and-fzf-mode)
* [Switching between Ripgrep mode and fzf mode using a single key binding](#switching-between-ripgrep-mode-and-fzf-mode-using-a-single-key-binding)
* [Controlling Ripgrep search and fzf search simultaneously](#controlling-ripgrep-search-and-fzf-search-simultaneously)
* [Log tailing](#log-tailing)
* [Key bindings for git objects](#key-bindings-for-git-objects)
* [Files listed in `git status`](#files-listed-in-git-status)
* [Branches](#branches)
* [Commit hashes](#commit-hashes)
* [Color themes](#color-themes)
* [fzf Theme Playground](#fzf-theme-playground)
* [Generating fzf color theme from Vim color schemes](#generating-fzf-color-theme-from-vim-color-schemes)
<!-- vim-markdown-toc -->
Introduction
------------
fzf is an interactive [Unix filter][filter] program that is designed to be
used with other Unix tools. It reads a list of items from the standard input,
allows you to select a subset of the items, and prints the selected ones to
the standard output. You can think of it as an interactive version of *grep*,
and it's already useful even if you don't know any of its options.
```sh
# 1. ps: Feed the list of processes to fzf
# 2. fzf: Interactively select a process using fuzzy matching algorithm
# 3. awk: Take the PID from the selected line
# 3. kill: Kill the process with the PID
ps -ef | fzf | awk '{print $2}' | xargs kill -9
```
[filter]: https://en.wikipedia.org/wiki/Filter_(software)
While the above example succinctly summarizes the fundamental concept of fzf,
you can build much more sophisticated interactive workflows using fzf once you
learn its wide variety of features.
- To see the full list of options and features, see `man fzf`
- To see the latest additions, see [CHANGELOG.md](CHANGELOG.md)
This document will guide you through some examples that will familiarize you
with the advanced features of fzf.
Display modes
-------------
### `--height`
fzf by default opens in fullscreen mode, but it's not always desirable.
Oftentimes, you want to see the current context of the terminal while using
fzf. `--height` is an option for opening fzf below the cursor in
non-fullscreen mode so you can still see the previous commands and their
results above it.
```sh
fzf --height=40%
```

You might also want to experiment with other layout options such as
`--layout=reverse`, `--info=inline`, `--border`, `--margin`, etc.
```sh
fzf --height=40% --layout=reverse
fzf --height=40% --layout=reverse --info=inline
fzf --height=40% --layout=reverse --info=inline --border
fzf --height=40% --layout=reverse --info=inline --border --margin=1
fzf --height=40% --layout=reverse --info=inline --border --margin=1 --padding=1
```

*(See man page to see the full list of options)*
But you definitely don't want to repeat `--height=40% --layout=reverse
--info=inline --border --margin=1 --padding=1` every time you use fzf. You
could write a wrapper script or shell alias, but there is an easier option.
Define `$FZF_DEFAULT_OPTS` like so:
```sh
export FZF_DEFAULT_OPTS="--height=40% --layout=reverse --info=inline --border --margin=1 --padding=1"
```
### `--tmux`
(Requires tmux 3.3 or later)
If you're using tmux, you can open fzf in a tmux popup using `--tmux` option.
```sh
# Open fzf in a tmux popup at the center of the screen with 70% width and height
fzf --tmux 70%
```

`--tmux` option is silently ignored if you're not on tmux. So if you're trying
to avoid opening fzf in fullscreen, try specifying both `--height` and `--tmux`.
```sh
# --tmux is specified later so it takes precedence over --height when on tmux.
# If you're not on tmux, --tmux is ignored and --height is used instead.
fzf --height 70% --tmux 70%
```
You can also specify the position, width, and height of the popup window in
the following format:
* `[center|top|bottom|left|right][,SIZE[%]][,SIZE[%][,border-native]]`
```sh
# 100% width and 60% height
fzf --tmux 100%,60% --border horizontal
```

```sh
# On the right (50% width)
fzf --tmux right
```

```sh
# On the left (40% width and 70% height)
fzf --tmux left,40%,70%
```

> [!TIP]
> You might also want to check out my tmux plugins which support this popup
> window layout.
>
> - https://github.com/junegunn/tmux-fzf-url
> - https://github.com/junegunn/tmux-fzf-maccy
Dynamic reloading of the list
-----------------------------
fzf can dynamically update the candidate list using an arbitrary program with
`reload` bindings (The design document for `reload` can be found
[here][reload]).
[reload]: https://github.com/junegunn/fzf/issues/1750
### Updating the list of processes by pressing CTRL-R
This example shows how you can set up a binding for dynamically updating the
list without restarting fzf.
```sh
(date; ps -ef) |
fzf --bind='ctrl-r:reload(date; ps -ef)' \
--header=$'Press CTRL-R to reload\n\n' --header-lines=2 \
--preview='echo {}' --preview-window=down,3,wrap \
--layout=reverse --height=80% | awk '{print $2}' | xargs kill -9
```

- The initial command is `(date; ps -ef)`. It prints the current date and
time, and the list of the processes.
- With `--header` option, you can show any message as the fixed header.
- To disallow selecting the first two lines (`date` and `ps` header), we use
`--header-lines=2` option.
- `--bind='ctrl-r:reload(date; ps -ef)'` binds CTRL-R to `reload` action that
runs `date; ps -ef`, so we can update the list of the processes by pressing
CTRL-R.
- We use simple `echo {}` preview option, so we can see the entire line on the
preview window below even if it's too long
### Toggling between data sources
You're not limited to just one reload binding. Set up multiple bindings so
you can switch between data sources.
```sh
find * | fzf --prompt 'All> ' \
--header 'CTRL-D: Directories / CTRL-F: Files' \
--bind 'ctrl-d:change-prompt(Directories> )+reload(find * -type d)' \
--bind 'ctrl-f:change-prompt(Files> )+reload(find * -type f)'
```


### Toggling with a single key binding
The above example uses two different key bindings to toggle between two modes,
but can we just use a single key binding?
To make a key binding behave differently each time it is pressed, we need:
1. a way to store the current state. i.e. "which mode are we in?"
2. and a way to dynamically perform different actions depending on the state.
The following example shows how to 1. store the current mode in the prompt
string, 2. and use this information (`$FZF_PROMPT`) to determine which
actions to perform using the `transform` action.
```sh
fd --type file |
fzf --prompt 'Files> ' \
--header 'CTRL-T: Switch between Files/Directories' \
--bind 'ctrl-t:transform:[[ ! $FZF_PROMPT =~ Files ]] &&
echo "change-prompt(Files> )+reload(fd --type file)" ||
echo "change-prompt(Directories> )+reload(fd --type directory)"' \
--preview '[[ $FZF_PROMPT =~ Files ]] && bat --color=always {} || tree -C {}'
```
Ripgrep integration
-------------------
### Using fzf as the secondary filter
* Requires [bat][bat]
* Requires [Ripgrep][rg]
[bat]: https://github.com/sharkdp/bat
[rg]: https://github.com/BurntSushi/ripgrep
fzf is pretty fast for filtering a list that you will rarely have to think
about its performance. But it is not the right tool for searching for text
inside many large files, and in that case you should definitely use something
like [Ripgrep][rg].
In the next example, Ripgrep is the primary filter that searches for the given
text in files, and fzf is used as the secondary fuzzy filter that adds
interactivity to the workflow. And we use [bat][bat] to show the matching line in
the preview window.
This is a bash script and it will not run as expected on other non-compliant
shells. To avoid the compatibility issue, let's save this snippet as a script
file called `rfv`.
```bash
#!/usr/bin/env bash
# 1. Search for text in files using Ripgrep
# 2. Interactively narrow down the list using fzf
# 3. Open the file in Vim
rg --color=always --line-number --no-heading --smart-case "${*:-}" |
fzf --ansi \
--color "hl:-1:underline,hl+:-1:underline:reverse" \
--delimiter : \
--preview 'bat --color=always {1} --highlight-line {2}' \
--preview-window 'up,60%,border-bottom,+{2}+3/3,~3' \
--bind 'enter:become(vim {1} +{2})'
```
And run it with an initial query string.
```sh
# Make the script executable
chmod +x rfv
# Run it with the initial query "algo"
./rfv algo
```
> Ripgrep will perform the initial search and list all the lines that contain
`algo`. Then we further narrow down the list on fzf.

I know it's a lot to digest, let's try to break down the code.
- Ripgrep prints the matching lines in the following format
```
man/man1/fzf.1:54:.BI "--algo=" TYPE
man/man1/fzf.1:55:Fuzzy matching algorithm (default: v2)
man/man1/fzf.1:58:.BR v2 " Optimal scoring algorithm (quality)"
src/pattern_test.go:7: "github.com/junegunn/fzf/src/algo"
```
The first token delimited by `:` is the file path, and the second token is
the line number of the matching line. They respectively correspond to `{1}`
and `{2}` in the preview command.
- `--preview 'bat --color=always {1} --highlight-line {2}'`
- As we run `rg` with `--color=always` option, we should tell fzf to parse
ANSI color codes in the input by setting `--ansi`.
- We customize how fzf colors various text elements using `--color` option.
`-1` tells fzf to keep the original color from the input. See `man fzf` for
available color options.
- The value of `--preview-window` option consists of 5 components delimited
by `,`
1. `up` — Position of the preview window
1. `60%` — Size of the preview window
1. `border-bottom` — Preview window border only on the bottom side
1. `+{2}+3/3` — Scroll offset of the preview contents
1. `~3` — Fixed header
- Let's break down the latter two. We want to display the bat output in the
preview window with a certain scroll offset so that the matching line is
positioned near the center of the preview window.
- `+{2}` — The base offset is extracted from the second token
- `+3` — We add 3 lines to the base offset to compensate for the header
part of `bat` output
- ```
───────┬──────────────────────────────────────────────────────────
│ File: CHANGELOG.md
───────┼──────────────────────────────────────────────────────────
1 │ CHANGELOG
2 │ =========
3 │
4 │ 0.26.0
5 │ ------
```
- `/3` adjusts the offset so that the matching line is shown at a third
position in the window
- `~3` makes the top three lines fixed header so that they are always
visible regardless of the scroll offset
- Instead of using shell script to process the final output of fzf, we use
`become(...)` action which was added in [fzf 0.38.0][0.38.0] to turn fzf
into a new process that opens the file with `vim` (`vim {1}`) and move the
cursor to the line (`+{2}`).
[0.38.0]: https://github.com/junegunn/fzf/blob/master/CHANGELOG.md#0380
### Using fzf as interactive Ripgrep launcher
We have learned that we can bind `reload` action to a key (e.g.
`--bind=ctrl-r:execute(ps -ef)`). In the next example, we are going to **bind
`reload` action to `change` event** so that whenever the user *changes* the
query string on fzf, `reload` action is triggered.
Here is a variation of the above `rfv` script. fzf will restart Ripgrep every
time the user updates the query string on fzf. Searching and filtering is
completely done by Ripgrep, and fzf merely provides the interactive interface.
So we lose the "fuzziness", but the performance will be better on larger
projects, and it will free up memory as you narrow down the results.
```bash
#!/usr/bin/env bash
# 1. Search for text in files using Ripgrep
# 2. Interactively restart Ripgrep with reload action
# 3. Open the file in Vim
RG_PREFIX="rg --column --line-number --no-heading --color=always --smart-case "
INITIAL_QUERY="${*:-}"
fzf --ansi --disabled --query "$INITIAL_QUERY" \
--bind "start:reload:$RG_PREFIX {q} || true" \
--bind "change:reload:sleep 0.1; $RG_PREFIX {q} || true" \
--delimiter : \
--preview 'bat --color=always {1} --highlight-line {2}' \
--preview-window 'up,60%,border-bottom,+{2}+3/3,~3' \
--bind 'enter:become(vim {1} +{2})'
```

- Instead of starting fzf in the usual `rg ... | fzf` form, we make it start
the initial Ripgrep process immediately via `start:reload` binding for the
consistency of the code.
- Filtering is no longer a responsibility of fzf; hence `--disabled`
- `{q}` in the reload command evaluates to the query string on fzf prompt.
- `sleep 0.1` in the reload command is for "debouncing". This small delay will
reduce the number of intermediate Ripgrep processes while we're typing in
a query.
### Switching to fzf-only search mode
In the previous example, we lost fuzzy matching capability as we completely
delegated search functionality to Ripgrep. But we can dynamically switch to
fzf-only search mode by *"unbinding"* `reload` action from `change` event.
```sh
#!/usr/bin/env bash
# Two-phase filtering with Ripgrep and fzf
#
# 1. Search for text in files using Ripgrep
# 2. Interactively restart Ripgrep with reload action
# * Press alt-enter to switch to fzf-only filtering
# 3. Open the file in Vim
RG_PREFIX="rg --column --line-number --no-heading --color=always --smart-case "
INITIAL_QUERY="${*:-}"
fzf --ansi --disabled --query "$INITIAL_QUERY" \
--bind "start:reload:$RG_PREFIX {q}" \
--bind "change:reload:sleep 0.1; $RG_PREFIX {q} || true" \
--bind "alt-enter:unbind(change,alt-enter)+change-prompt(2. fzf> )+enable-search+clear-query" \
--color "hl:-1:underline,hl+:-1:underline:reverse" \
--prompt '1. ripgrep> ' \
--delimiter : \
--preview 'bat --color=always {1} --highlight-line {2}' \
--preview-window 'up,60%,border-bottom,+{2}+3/3,~3' \
--bind 'enter:become(vim {1} +{2})'
```
* Phase 1. Filtering with Ripgrep

* Phase 2. Filtering with fzf

- We added `--prompt` option to show that fzf is initially running in "Ripgrep
launcher mode".
- We added `alt-enter` binding that
1. unbinds `change` event, so Ripgrep is no longer restarted on key press
2. changes the prompt to `2. fzf>`
3. enables search functionality of fzf
4. clears the current query string that was used to start Ripgrep process
5. and unbinds `alt-enter` itself as this is a one-off event
- We reverted `--color` option for customizing how the matching chunks are
displayed in the second phase
### Switching between Ripgrep mode and fzf mode
[fzf 0.30.0][0.30.0] added `rebind` action so we can "rebind" the bindings
that were previously "unbound" via `unbind`.
This is an improved version of the previous example that allows us to switch
between Ripgrep launcher mode and fzf-only filtering mode via CTRL-R and
CTRL-F.
```sh
#!/usr/bin/env bash
# Switch between Ripgrep launcher mode (CTRL-R) and fzf filtering mode (CTRL-F)
rm -f /tmp/rg-fzf-{r,f}
RG_PREFIX="rg --column --line-number --no-heading --color=always --smart-case "
INITIAL_QUERY="${*:-}"
fzf --ansi --disabled --query "$INITIAL_QUERY" \
--bind "start:reload($RG_PREFIX {q})+unbind(ctrl-r)" \
--bind "change:reload:sleep 0.1; $RG_PREFIX {q} || true" \
--bind "ctrl-f:unbind(change,ctrl-f)+change-prompt(2. fzf> )+enable-search+rebind(ctrl-r)+transform-query(echo {q} > /tmp/rg-fzf-r; cat /tmp/rg-fzf-f)" \
--bind "ctrl-r:unbind(ctrl-r)+change-prompt(1. ripgrep> )+disable-search+reload($RG_PREFIX {q} || true)+rebind(change,ctrl-f)+transform-query(echo {q} > /tmp/rg-fzf-f; cat /tmp/rg-fzf-r)" \
--color "hl:-1:underline,hl+:-1:underline:reverse" \
--prompt '1. ripgrep> ' \
--delimiter : \
--header '╱ CTRL-R (ripgrep mode) ╱ CTRL-F (fzf mode) ╱' \
--preview 'bat --color=always {1} --highlight-line {2}' \
--preview-window 'up,60%,border-bottom,+{2}+3/3,~3' \
--bind 'enter:become(vim {1} +{2})'
```
- To restore the query string when switching between modes, we store the
current query in `/tmp/rg-fzf-{r,f}` files and restore the query using
`transform-query` action which was added in [fzf 0.36.0][0.36.0].
- Also note that we unbind `ctrl-r` binding on `start` event which is
triggered once when fzf starts.
[0.30.0]: https://github.com/junegunn/fzf/blob/master/CHANGELOG.md#0300
[0.36.0]: https://github.com/junegunn/fzf/blob/master/CHANGELOG.md#0360
### Switching between Ripgrep mode and fzf mode using a single key binding
In contrast to the previous version, we use just one hotkey to toggle between
ripgrep and fzf mode. This is achieved by using the `$FZF_PROMPT` as a state
within the `transform` action, a feature introduced in [fzf 0.45.0][0.45.0]. A
more detailed explanation of this feature can be found in a previous section -
[Toggling with a single keybinding](#toggling-with-a-single-key-binding).
[0.45.0]: https://github.com/junegunn/fzf/blob/master/CHANGELOG.md#0450
When using the `transform` action, the placeholder (`\{q}`) should be escaped to
prevent immediate evaluation.
```sh
#!/usr/bin/env bash
# Switch between Ripgrep mode and fzf filtering mode (CTRL-T)
rm -f /tmp/rg-fzf-{r,f}
RG_PREFIX="rg --column --line-number --no-heading --color=always --smart-case "
INITIAL_QUERY="${*:-}"
fzf --ansi --disabled --query "$INITIAL_QUERY" \
--bind "start:reload:$RG_PREFIX {q}" \
--bind "change:reload:sleep 0.1; $RG_PREFIX {q} || true" \
--bind 'ctrl-t:transform:[[ ! $FZF_PROMPT =~ ripgrep ]] &&
echo "rebind(change)+change-prompt(1. ripgrep> )+disable-search+transform-query:echo \{q} > /tmp/rg-fzf-f; cat /tmp/rg-fzf-r" ||
echo "unbind(change)+change-prompt(2. fzf> )+enable-search+transform-query:echo \{q} > /tmp/rg-fzf-r; cat /tmp/rg-fzf-f"' \
--color "hl:-1:underline,hl+:-1:underline:reverse" \
--prompt '1. ripgrep> ' \
--delimiter : \
--header 'CTRL-T: Switch between ripgrep/fzf' \
--preview 'bat --color=always {1} --highlight-line {2}' \
--preview-window 'up,60%,border-bottom,+{2}+3/3,~3' \
--bind 'enter:become(vim {1} +{2})'
```
### Controlling Ripgrep search and fzf search simultaneously
`search` and `transform-search` action allow you to trigger an fzf search with
an arbitrary query string. This frees fzf from strictly following the prompt
input, enabling custom search syntax.
In the example below, `transform` action is used to conditionally trigger
`reload` for ripgrep, followed by `search` for fzf. The first word of the
query initiates the Ripgrep process to generate the initial results, while the
remainder of the query is passed to fzf for secondary filtering.
```sh
#!/usr/bin/env bash
export TEMP=$(mktemp -u)
trap 'rm -f "$TEMP"' EXIT
INITIAL_QUERY="${*:-}"
TRANSFORMER='
rg_pat={q:1} # The first word is passed to ripgrep
fzf_pat={q:2..} # The rest are passed to fzf
if ! [[ -r "$TEMP" ]] || [[ $rg_pat != $(cat "$TEMP") ]]; then
echo "$rg_pat" > "$TEMP"
printf "reload:sleep 0.1; rg --column --line-number --no-heading --color=always --smart-case %q || true" "$rg_pat"
fi
echo "+search:$fzf_pat"
'
fzf --ansi --disabled --query "$INITIAL_QUERY" \
--with-shell 'bash -c' \
--bind "start,change:transform:$TRANSFORMER" \
--color "hl:-1:underline,hl+:-1:underline:reverse" \
--delimiter : \
--preview 'bat --color=always {1} --highlight-line {2}' \
--preview-window 'up,60%,border-line,+{2}+3/3,~3' \
--bind 'enter:become(vim {1} +{2})'
```
Log tailing
-----------
fzf can run long-running preview commands and render partial results before
completion. And when you specify `follow` flag in `--preview-window` option,
fzf will "`tail -f`" the result, automatically scrolling to the bottom.
```bash
# With "follow", preview window will automatically scroll to the bottom.
# "\033[2J" is an ANSI escape sequence for clearing the screen.
# When fzf reads this code it clears the previous preview contents.
fzf --preview-window follow --preview 'for i in $(seq 100000); do
echo "$i"
sleep 0.01
(( i % 300 == 0 )) && printf "\033[2J"
done'
```

Admittedly, that was a silly example. Here's a practical one for browsing
Kubernetes pods.
```bash
pods() {
command='kubectl get pods --all-namespaces' fzf \
--info=inline --layout=reverse --header-lines=1 \
--prompt "$(kubectl config current-context | sed 's/-context$//')> " \
--header $'╱ Enter (kubectl exec) ╱ CTRL-O (open log in editor) ╱ CTRL-R (reload) ╱\n\n' \
--bind 'start,ctrl-r:reload:$command' \
--bind 'ctrl-/:change-preview-window(80%,border-bottom|hidden|)' \
--bind 'enter:execute:kubectl exec -it --namespace {1} {2} -- bash' \
--bind 'ctrl-o:execute:${EDITOR:-vim} <(kubectl logs --all-containers --namespace {1} {2})' \
--preview-window up:follow \
--preview 'kubectl logs --follow --all-containers --tail=10000 --namespace {1} {2}' "$@"
}
```

- The preview window will *"log tail"* the pod
- Holding on to a large amount of log will consume a lot of memory. So we
limited the initial log amount with `--tail=10000`.
- `execute` bindings allow you to run any command without leaving fzf
- Press enter key on a pod to `kubectl exec` into it
- Press CTRL-O to open the log in your editor
- Press CTRL-R to reload the pod list
- Press CTRL-/ repeatedly to rotate through a different sets of preview
window options
1. `80%,border-bottom`
1. `hidden`
1. Empty string after `|` translates to the default options from `--preview-window`
Key bindings for git objects
----------------------------
Oftentimes, you want to put the identifiers of various Git object to the
command-line. For example, it is common to write commands like these:
```sh
git checkout [SOME_COMMIT_HASH or BRANCH or TAG]
git diff [SOME_COMMIT_HASH or BRANCH or TAG] [SOME_COMMIT_HASH or BRANCH or TAG]
```
[fzf-git.sh](https://github.com/junegunn/fzf-git.sh) project defines a set of
fzf-based key bindings for Git objects. I strongly recommend that you check
them out because they are seriously useful.
### Files listed in `git status`
<kbd>CTRL-G</kbd><kbd>CTRL-F</kbd>

### Branches
<kbd>CTRL-G</kbd><kbd>CTRL-B</kbd>

### Commit hashes
<kbd>CTRL-G</kbd><kbd>CTRL-H</kbd>

Color themes
------------
You can customize how fzf colors the text elements with `--color` option. Here
are a few color themes. Note that you need a terminal emulator that can
display 24-bit colors.
```sh
# junegunn/seoul256.vim (dark)
export FZF_DEFAULT_OPTS='--color=bg+:#3F3F3F,bg:#4B4B4B,border:#6B6B6B,spinner:#98BC99,hl:#719872,fg:#D9D9D9,header:#719872,info:#BDBB72,pointer:#E12672,marker:#E17899,fg+:#D9D9D9,preview-bg:#3F3F3F,prompt:#98BEDE,hl+:#98BC99'
```

```sh
# junegunn/seoul256.vim (light)
export FZF_DEFAULT_OPTS='--color=bg+:#D9D9D9,bg:#E1E1E1,border:#C8C8C8,spinner:#719899,hl:#719872,fg:#616161,header:#719872,info:#727100,pointer:#E12672,marker:#E17899,fg+:#616161,preview-bg:#D9D9D9,prompt:#0099BD,hl+:#719899'
```

```sh
# morhetz/gruvbox
export FZF_DEFAULT_OPTS='--color=bg+:#3c3836,bg:#32302f,spinner:#fb4934,hl:#928374,fg:#ebdbb2,header:#928374,info:#8ec07c,pointer:#fb4934,marker:#fb4934,fg+:#ebdbb2,prompt:#fb4934,hl+:#fb4934'
```

```sh
# arcticicestudio/nord-vim
export FZF_DEFAULT_OPTS='--color=bg+:#3B4252,bg:#2E3440,spinner:#81A1C1,hl:#616E88,fg:#D8DEE9,header:#616E88,info:#81A1C1,pointer:#81A1C1,marker:#81A1C1,fg+:#D8DEE9,prompt:#81A1C1,hl+:#81A1C1'
```

```sh
# tomasr/molokai
export FZF_DEFAULT_OPTS='--color=bg+:#293739,bg:#1B1D1E,border:#808080,spinner:#E6DB74,hl:#7E8E91,fg:#F8F8F2,header:#7E8E91,info:#A6E22E,pointer:#A6E22E,marker:#F92672,fg+:#F8F8F2,prompt:#F92672,hl+:#F92672'
```

### fzf Theme Playground
[fzf Theme Playground](https://vitormv.github.io/fzf-themes/) created by
[Vitor Mello](https://github.com/vitormv) is a webpage where you can
interactively create fzf themes.
### Generating fzf color theme from Vim color schemes
The Vim plugin of fzf can generate `--color` option from the current color
scheme according to `g:fzf_colors` variable. You can find the detailed
explanation [here](https://github.com/junegunn/fzf/blob/master/README-VIM.md#explanation-of-gfzf_colors).
Here is an example. Add this to your Vim configuration file.
```vim
let g:fzf_colors =
\ { 'fg': ['fg', 'Normal'],
\ 'bg': ['bg', 'Normal'],
\ 'preview-bg': ['bg', 'NormalFloat'],
\ 'hl': ['fg', 'Comment'],
\ 'fg+': ['fg', 'CursorLine', 'CursorColumn', 'Normal'],
\ 'bg+': ['bg', 'CursorLine', 'CursorColumn'],
\ 'hl+': ['fg', 'Statement'],
\ 'info': ['fg', 'PreProc'],
\ 'border': ['fg', 'Ignore'],
\ 'prompt': ['fg', 'Conditional'],
\ 'pointer': ['fg', 'Exception'],
\ 'marker': ['fg', 'Keyword'],
\ 'spinner': ['fg', 'Label'],
\ 'header': ['fg', 'Comment'] }
```
Then you can see how the `--color` option is generated by printing the result
of `fzf#wrap()`.
```vim
:echo fzf#wrap()
```
Use this command to append `export FZF_DEFAULT_OPTS="..."` line to the end of
the current file.
```vim
:call append('$', printf('export FZF_DEFAULT_OPTS="%s"', matchstr(fzf#wrap().options, "--color[^']*")))
```
================================================
FILE: BUILD.md
================================================
Building fzf
============
Build instructions
------------------
### Prerequisites
- Go 1.23 or above
### Using Makefile
```sh
# Build fzf binary for your platform in target
make
# Build fzf binary and copy it to bin directory
make install
# Build fzf binaries and archives for all platforms using goreleaser
make build
# Publish GitHub release
make release
```
> [!WARNING]
> Makefile uses git commands to determine the version and the revision
> information for `fzf --version`. So if you're building fzf from an
> environment where its git information is not available, you have to manually
> set `$FZF_VERSION` and `$FZF_REVISION`.
>
> e.g. `FZF_VERSION=0.24.0 FZF_REVISION=tarball make`
> [!TIP]
> To build fzf with profiling options enabled, set `TAGS=pprof`
>
> ```sh
> TAGS=pprof make clean install
> fzf --profile-cpu /tmp/cpu.pprof --profile-mem /tmp/mem.pprof \
> --profile-block /tmp/block.pprof --profile-mutex /tmp/mutex.pprof
> ```
Running tests
-------------
```sh
# Run go unit tests
make test
# Run integration tests (requires to be on tmux)
make itest
# Run a single test case
ruby test/runner.rb --name test_something
```
Third-party libraries used
--------------------------
- [rivo/uniseg](https://github.com/rivo/uniseg)
- Licensed under [MIT](https://raw.githubusercontent.com/rivo/uniseg/master/LICENSE.txt)
- [mattn/go-shellwords](https://github.com/mattn/go-shellwords)
- Licensed under [MIT](http://mattn.mit-license.org)
- [mattn/go-isatty](https://github.com/mattn/go-isatty)
- Licensed under [MIT](http://mattn.mit-license.org)
- [tcell](https://github.com/gdamore/tcell)
- Licensed under [Apache License 2.0](https://github.com/gdamore/tcell/blob/master/LICENSE)
- [fastwalk](https://github.com/charlievieth/fastwalk)
- Licensed under [MIT](https://raw.githubusercontent.com/charlievieth/fastwalk/master/LICENSE)
License
-------
[MIT](LICENSE)
================================================
FILE: CHANGELOG.md
================================================
CHANGELOG
=========
0.71.0
------
- Cross-reload item identity with `--id-nth`
- Added `--id-nth=NTH` to define item identity fields for cross-reload operations
- When a `reload` is triggered with tracking enabled, fzf searches for the tracked item by its identity fields in the new list.
- `--track --id-nth ..` tracks by the entire line
- `--track --id-nth 1` tracks by the first field
- `--track` without `--id-nth` retains the existing index-based tracking behavior
- The UI is temporarily blocked (prompt dimmed, input disabled) until the item is found or loading completes.
- Press `Escape` or `Ctrl-C` to cancel the blocked state without quitting
- Info line shows `+T*` / `+t*` while searching
- With `--multi`, selected items are preserved across `reload-sync` by matching their identity fields
- Performance improvements
- The search performance now scales linearly with the number of CPU cores, as we dropped static partitioning to allow better load balancing across threads.
```
=== query: 'linux' ===
[all] baseline: 17.12ms current: 14.28ms (1.20x) matches: 179966 (12.79%)
[1T] baseline: 136.49ms current: 137.25ms (0.99x) matches: 179966 (12.79%)
[2T] baseline: 75.74ms current: 68.75ms (1.10x) matches: 179966 (12.79%)
[4T] baseline: 41.16ms current: 34.97ms (1.18x) matches: 179966 (12.79%)
[8T] baseline: 32.82ms current: 17.79ms (1.84x) matches: 179966 (12.79%)
```
- Improved the cache structure, reducing memory footprint per entry by 86x.
- With the reduced per-entry cost, the cache now has broader coverage.
- fish: Improved command history (CTRL-R) (#4703) (@bitraid)
- Bug fixes
- `--walker=follow` no longer follows symlinks whose target is an ancestor of the walker root, avoiding severe resource exhaustion when a symlink points outside the tree (e.g. Wine's `z:` → `/`) (#4710)
- Fixed AWK tokenizer not treating a new line character as whitespace
- Fixed `--{accept,with}-nth` removing trailing whitespaces with a non-default `--delimiter`
- Fixed OSC8 hyperlinks being mangled when the URL contains unicode characters (#4707)
- Fixed `--with-shell` not handling quoted arguments correctly (#4709)
0.70.0
------
- Added `change-with-nth` action for dynamically changing the `--with-nth` option.
- Requires `--with-nth` to be set initially.
- Multiple options separated by `|` can be given to cycle through.
```sh
echo -e "a b c\nd e f\ng h i" | fzf --with-nth .. \
--bind 'space:change-with-nth(1|2|3|1,3|2,3|)'
```
- Added `change-header-lines` action for dynamically changing the `--header-lines` option
- Performance improvements (1.3x to 1.9x faster filtering depending on query)
```
=== query: 'l' ===
[all] baseline: 168.87ms current: 95.21ms (1.77x) matches: 5069891 (94.78%)
[1T] baseline: 1652.22ms current: 841.40ms (1.96x) matches: 5069891 (94.78%)
=== query: 'lin' ===
[all] baseline: 343.27ms current: 252.59ms (1.36x) matches: 3516507 (65.74%)
[1T] baseline: 3199.89ms current: 2230.64ms (1.43x) matches: 3516507 (65.74%)
=== query: 'linux' ===
[all] baseline: 85.47ms current: 63.72ms (1.34x) matches: 307229 (5.74%)
[1T] baseline: 774.64ms current: 589.32ms (1.31x) matches: 307229 (5.74%)
=== query: 'linuxlinux' ===
[all] baseline: 55.13ms current: 35.67ms (1.55x) matches: 12230 (0.23%)
[1T] baseline: 461.99ms current: 332.38ms (1.39x) matches: 12230 (0.23%)
=== query: 'linuxlinuxlinux' ===
[all] baseline: 51.77ms current: 32.53ms (1.59x) matches: 865 (0.02%)
[1T] baseline: 409.99ms current: 296.33ms (1.38x) matches: 865 (0.02%)
```
- Fixed `nth` attribute merge order to respect precedence hierarchy (#4697)
- bash: Replaced `printf` with builtin `printf` to bypass local indirections (#4684) (@DarrenBishop)
0.68.0
------
- Implemented word wrapping in the list section
- Added `--wrap=word` (or `--wrap-word`) option and `toggle-wrap-word` action for word-level line wrapping in the list section
- Changed default binding of `ctrl-/` and `alt-/` from `toggle-wrap` to `toggle-wrap-word`
```sh
fzf --wrap=word
```
- Implemented word wrapping in the preview window
- Added `wrap-word` flag for `--preview-window` to enable word-level wrapping
- Added `toggle-preview-wrap-word` action
```sh
fzf --preview 'bat --style=plain --color=always {}' \
--preview-window wrap-word \
--bind space:toggle-preview-wrap-word
```
- Added support for underline style variants in `--color`: `underline-double`, `underline-curly`, `underline-dotted`, `underline-dashed`
```sh
fzf --color 'fg:underline-curly,current-fg:underline-dashed'
```
- Added support for underline styles (`4:N`) and underline colors (SGR 58/59)
```sh
# In the list section
printf '\e[4:3;58;2;255;0;0mRed curly underline\e[0m\n' | fzf --ansi
# In the preview window
fzf --preview "printf '\e[4:3;58;2;255;0;0mRed curly underline\e[0m\n'"
```
- Added `--preview-wrap-sign` to set a different wrap indicator for the preview window
- Added `alt-gutter` color option (#4602) (@hedgieinsocks)
- Added `$FZF_WRAP` environment variable to child processes (`char` or `word` when wrapping is enabled) (#4672) (@bitraid)
- fish: Improved command history (CTRL-R) (#4672) (@bitraid)
- Enabled syntax highlighting in the list on fish 4.3.3+
- Added syntax-highlighted preview window that auto-shows for long or multi-line commands
- Added `ALT-ENTER` to reformat and insert selected commands
- Improved handling of bulk deletion of selected history entries (`SHIFT-DELETE`)
- Added fish completion support (#4605) (@lalvarezt)
- zsh: Handle multi-line history selection (#4595) (@LangLangBart)
- Bug fixes
- Fixed `_fzf_compgen_{path,dir}` to respect `FZF_COMPLETION_{PATH,DIR}_OPTS` (#4592) (@shtse8, @LangLangBart)
- Fixed `--preview-window follow` not working correctly with wrapping (#3243, #4258)
- Fixed symlinks to directories being returned as files (#4676) (@skk64)
- Fixed SIGHUP signal handling (#4668) (@LangLangBart)
- Fixed preview process not killed on exit (#4667)
- Fixed coloring of items with zero-width characters (#4620)
- Fixed `track-current` unset after a combined movement action (#4649)
- Fixed `--accept-nth` being ignored in filter mode (#4636) (@charemma)
- Fixed display width calculation with `maxWidth` (#4596) (@LangLangBart)
- Fixed clearing of the rest of the current line on start (#4652)
- Fixed `x-api-key` header not required for GET requests (#4627)
- Fixed key reading not cancelled when `execute` triggered via a server request (#4653)
- Fixed rebind of readline command `redraw-current-line` (#4635) (@jameslazo)
- Fixed `fzf-tmux` `TERM` quoting and added `mktemp` usage (#4664) (@Goofygiraffe06)
- Do not allow very long queries in `FuzzyMatchV2` (#4608)
0.67.0
------
- Added `--freeze-left=N` option to keep the leftmost N columns always visible.
```sh
# Keep the file name column fixed and always visible
git grep --line-number --color=always -- '' |
fzf --ansi --delimiter : --freeze-left 1
# Can be used with --keep-right
git grep --line-number --color=always -- '' |
fzf --ansi --delimiter : --freeze-left 1 --keep-right
```
- Also added `--freeze-right=N` option to keep the rightmost N columns always visible.
```sh
# Stronger version of --keep-right that always keeps the right-end visible
fd | fzf --freeze-right 1
# Keep the base name always visible
fd | fzf --freeze-right 1 --delimiter /
# Keep both leftmost and rightmost components visible
fd | fzf --freeze-left 1 --freeze-right 1 --delimiter /
```
- Updated `--info=inline` to print the spinner (load indicator).
- Bug fixes
0.66.1
------
- Bug fixes
- Fixed a bug preventing 'ctrl-h' from being bound to an action (#4556)
- Fixed `--no-color` / `NO_COLOR` theme (#4561)
0.66.0
------
### Quick summary
This version introduces many new features centered around the new "raw" mode.
| Type | Class | Name | Description |
| :-- | :-- | :-- | :-- |
| New | Option | `--raw` | Enable raw mode by default |
| New | Option | `--gutter CHAR` | Set the gutter column character |
| New | Option | `--gutter-raw CHAR` | Set the gutter column character in raw mode |
| Enhancement | Option | `--listen SOCKET` | Added support for Unix domain sockets |
| New | Action | `toggle-raw` | Toggle raw mode |
| New | Action | `enable-raw` | Enable raw mode |
| New | Action | `disable-raw` | Disable raw mode |
| New | Action | `up-match` | Move up to the matching item |
| New | Action | `down-match` | Move down to the matching item |
| New | Action | `best` | Move to the matching item with the best score |
| New | Color | `nomatch` | Color for non-matching items in raw mode |
| New | Env Var | `FZF_RAW` | Matching status in raw mode (0, 1, or undefined) |
| New | Env Var | `FZF_DIRECTION` | `up` or `down` depending on the layout |
| New | Env Var | `FZF_SOCK` | Path to the Unix domain socket fzf is listening on |
| Enhancement | Key | `CTRL-N` | `down` -> `down-match` |
| Enhancement | Key | `CTRL-P` | `up` -> `up-match` |
| Enhancement | Shell | `CTRL-R` binding | Toggle raw mode with `ALT-R` |
| Enhancement | Shell | `CTRL-R` binding | Opt-out with an empty `FZF_CTRL_R_COMMAND` |
### 1. Introducing "raw" mode

This version introduces a new "raw" mode (named so because it shows the list
"unfiltered"). In raw mode, non-matching items stay in their original positions,
but appear dimmed. This allows you to see the surrounding items of a match and
better understand the context of it. You can enable raw mode by default with
`--raw`, but it's often more useful when toggled dynamically with the
`toggle-raw` action.
```sh
tree | fzf --reverse --bind alt-r:toggle-raw
```
While non-matching items are displayed in a dimmed color, they are treated just
like matching items, so you place the cursor on them and perform any action. If
you prefer to navigate only through matching items, use the `down-match` and
`up-match` actions, which are from now on bound to `CTRL-N` and `CTRL-P`
respectively, and also to `ALT-DOWN` and `ALT-UP`.
| Key | Action | With `--history` |
| :-- | :-- | :-- |
| `down` | `down` | |
| `up` | `up` | |
| `ctrl-j` | `down` | |
| `ctrl-k` | `up` | |
| `ctrl-n` | `down-match` | `next-history` |
| `ctrl-p` | `up-match` | `prev-history` |
| `alt-down` | `down-match` | |
| `alt-up` | `up-match` | |
> [!NOTE]
> `CTRL-N` and `CTRL-P` are bound to `next-history` and `prev-history` when
> `--history` option is enabled, so in that case, you'll need to manually bind
> them, or use `ALT-DOWN` and `ALT-UP` instead.
> [!TIP]
> `up-match` and `down-match` are equivalent to `up` and `down` when not in
> raw mode, so you can safely bind them to `up` and `arrow` keys if you prefer.
> ```sh
> fzf --bind up:up-match,down:down-match
> ```
#### Customizing the behavior
In raw mode, the input list is presented in its original order, unfiltered, and
your cursor will not move to the matching item automatically. Here are ways to
customize the behavior.
```sh
# When the result list is updated, move the cursor to the item with the best score
# (assuming sorting is not disabled)
fzf --raw --bind result:best
# Move to the first matching item in the original list
# - $FZF_RAW is set to 0 when raw mode is enabled and the current item is a non-match
# - $FZF_DIRECTION is set to either 'up' or 'down' depending on the layout direction
fzf --raw --bind 'result:first+transform:[[ $FZF_RAW = 0 ]] && echo $FZF_DIRECTION-match'
```
#### Customizing the look
##### Gutter
To make the mode visually distinct, the gutter column is rendered in a dashed
line using `▖` character. But you can customize it with the `--gutter-raw CHAR`
option.
```sh
# Use a thinner gutter instead of the default dashed line
fzf --bind alt-r:toggle-raw --gutter-raw ▎
```
##### Color and style of non-matching items
Non-matching items are displayed in a dimmed color by default, but you can
change it with the `--color nomatch:...` option.
```sh
fzf --raw --color nomatch:red
fzf --raw --color nomatch:red:dim
fzf --raw --color nomatch:red:dim:strikethrough
fzf --raw --color nomatch:red:dim:strikethrough:italic
```
For colored input, dimming alone may not be enough, and you may prefer to remove
colors entirely. For that case, a new special style attribute `strip` has been
added.
```sh
fd --color always | fzf --ansi --raw --color nomatch:dim:strip:strikethrough
```
#### Conditional actions for raw mode
You may want to perform different actions depending on whether the current item
is a match or not. For that, fzf now exports `$FZF_RAW` environment variable.
It's:
- Undefined if raw mode is disabled
- `1` if the current item is a match
- `0` otherwise
```sh
# Do not allow selecting non-matching items
fzf --raw --bind 'enter:transform:[[ ${FZF_RAW-1} = 1 ]] && echo accept || echo bell'
```
#### Leveraging raw mode in shell integration
The `CTRL-R` binding (command history) now lets you toggle raw mode with `ALT-R`.
### 2. Style changes
The screenshot on the right shows the updated gutter style:

This version includes a few minor updates to fzf's classic visual style:
- The gutter column is now narrower, rendered with the left-half block character (`▌`).
- Markers no longer use background colors.
- The `--color base16` theme (alias: `16`) has been updated for better compatibility with both dark and light themes.
### 3. `--listen` now supports Unix domain sockets
If an argument to `--listen` ends with `.sock`, fzf will listen on a Unix
domain socket at the specified path.
```sh
fzf --listen /tmp/fzf.sock --no-tmux
# GET
curl --unix-socket /tmp/fzf.sock http
# POST
curl --unix-socket /tmp/fzf.sock http -d up
```
Note that any existing file at the given path will be removed before creating
the socket, so avoid using an important file path.
### 4. Added options
#### `--gutter CHAR`
The gutter column can now be customized using `--gutter CHAR` and styled with
`--color gutter:...`. Examples:
```sh
# Right-aligned gutter
fzf --gutter '▐'
# Even thinner gutter
fzf --gutter '▎'
# Yellow checker pattern
fzf --gutter '▚' --color gutter:yellow
# Classic style
fzf --gutter ' ' --color gutter:reverse
```
#### `--gutter-raw CHAR`
As noted above, the `--gutter-raw CHAR` option was also added for customizing the gutter column in raw mode.
### 5. Added actions
The following actions were introduced to support working with raw mode:
| Action | Description |
| :-- | :-- |
| `toggle-raw` | Toggle raw mode |
| `enable-raw` | Enable raw mode |
| `disable-raw` | Disable raw mode |
| `up-match` | Move up to the matching item; identical to `up` if raw mode is disabled |
| `down-match` | Move down to the matching item; identical to `down` if raw mode is disabled |
| `best` | Move to the matching item with the best score; identical to `first` if raw mode is disabled |
### 6. Added environment variables
#### `$FZF_DIRECTION`
`$FZF_DIRECTION` is now exported to child processes, indicating the list direction of the current layout:
- `up` for the default layout
- `down` for `reverse` or `reverse-list`
This simplifies writing transform actions involving layout-dependent actions
like `{up,down}-match`, `{up,down}-selected`, and `toggle+{up,down}`.
```sh
fzf --raw --bind 'result:first+transform:[[ $FZF_RAW = 0 ]] && echo $FZF_DIRECTION-match'
```
#### `$FZF_SOCK`
When fzf is listening on a Unix domain socket using `--listen`, the path to the
socket is exported as `$FZF_SOCK`, analogous to `$FZF_PORT` for TCP sockets.
#### `$FZF_RAW`
As described above, `$FZF_RAW` is now exported to child processes in raw mode,
indicating whether the current item is a match (`1`) or not (`0`). It is not
defined when not in raw mode.
#### `$FZF_CTRL_R_COMMAND`
You can opt-out `CTRL-R` binding from the shell integration by setting
`FZF_CTRL_R_COMMAND` to an empty string. Setting it to any other value is not
supported and will result in a warning.
```sh
# Disable the CTRL-R binding from the shell integration
FZF_CTRL_R_COMMAND= eval "$(fzf --bash)"
```
### 7. Added key support for `--bind`
Pull request [#3996](https://github.com/junegunn/fzf/pull/3996) added support
for many additional keys for `--bind` option, such as `ctrl-backspace`.
### 8. Breaking changes
#### Hiding the gutter column
In the previous versions, the recommended way to hide the gutter column was to
set `--color gutter:-1`. That's because the gutter column was just a space
character, reversed. But now that it's using a visible character (`▌`), applying
the default color is no longer enough to hide it. Instead, you can set it to
a space character.
```sh
# Hide the gutter column
fzf --gutter ' '
# Classic style
fzf --gutter ' ' --color gutter:reverse
```
#### `--color` option
In the previous versions, some elements had default style attributes applied and
you would have to explicitly unset them with `regular` attribute if you wanted
to reset them. This is no longer needed now, as the default style attributes
are applied only when you do not specify any color or style for that element.
```sh
# No 'dim', just red and italic.
fzf --ghost 'Type to search' --color ghost:red:italic
```
#### Compatibility changes
Starting with this release, fzf is built with Go 1.23. Support for some old OS versions has been dropped.
See https://go.dev/wiki/MinimumRequirements.
0.65.2
------
- Bug fixes and improvements
- Fix incorrect truncation of `--info-command` with `--info=inline-right` (#4479)
- [install] Support old uname in macOS (#4492)
- [bash 3] Fix `CTRL-T` and `ALT-C` to preserve the last yank (#4496)
- Do not unset `FZF_DEFAULT_*` variables when using winpty (#4497) (#4400)
- Fix rendering of items with tabs when using a non-default ellipsis (#4505)
- **This is the final release to support Windows 7.**
- Future versions will be built with the latest Go toolchain, which has dropped support for Windows 7.
0.65.1
------
- Fixed incorrect `$FZF_CLICK_HEADER_WORD` and `$FZF_CLICK_FOOTER_WORD` when the header or footer contains ANSI escape sequences and tab characters.
- Fixed a bug where you cannot unset the default `--nth` using `change-nth` action.
- Fixed a highlighting bug when using `--color fg:dim,nth:regular` pattern over ANSI-colored items.
0.65.0
------
- Added `click-footer` event that is triggered when the footer section is clicked. When the event is triggered, the following environment variables are set:
- `$FZF_CLICK_FOOTER_COLUMN` - clicked column (1-based)
- `$FZF_CLICK_FOOTER_LINE` - clicked line (1-based)
- `$FZF_CLICK_FOOTER_WORD` - the word under the cursor
```sh
fzf --footer $'[Edit] [View]\n[Copy to clipboard]' \
--with-shell 'bash -c' \
--bind 'click-footer:transform:
[[ $FZF_CLICK_FOOTER_WORD =~ Edit ]] && echo "execute:vim \{}"
[[ $FZF_CLICK_FOOTER_WORD =~ View ]] && echo "execute:view \{}"
(( FZF_CLICK_FOOTER_LINE == 2 )) && (( FZF_CLICK_FOOTER_COLUMN < 20 )) &&
echo "execute-silent(echo -n \{} | pbcopy)+bell"
'
```
- Added `trigger(...)` action that triggers events bound to another key or event.
```sh
# You can click on each key name to trigger the actions bound to that key
fzf --footer 'Ctrl-E: Edit / Ctrl-V: View / Ctrl-Y: Copy to clipboard' \
--with-shell 'bash -c' \
--bind 'ctrl-e:execute:vim {}' \
--bind 'ctrl-v:execute:view {}' \
--bind 'ctrl-y:execute-silent(echo -n {} | pbcopy)+bell' \
--bind 'click-footer:transform:
[[ $FZF_CLICK_FOOTER_WORD =~ Ctrl ]] && echo "trigger(${FZF_CLICK_FOOTER_WORD%:})"
'
```
- You can specify a series of keys and events
```sh
fzf --bind 'a:up,b:trigger(a,a,a)'
```
- Added support for `{*n}` and `{*nf}` placeholder.
- `{*n}` evaluates to the zero-based ordinal index of all matched items.
- `{*nf}` evaluates to the temporary file containing that.
- Bug fixes and improvements
- [neovim] Fixed margin background color when `&winborder` is used (#4453)
- Fixed rendering error when hiding a preview window without border (#4465)
- fix(shell): check for mawk existence before version check (#4468)
- Thanks to @LangLangBart and @akinomyoga
- Fixed `--no-header-lines-border` behavior (08027e7a)
0.64.0
------
- Added `multi` event that is triggered when the multi-selection has changed.
```sh
fzf --multi \
--bind 'ctrl-a:select-all,ctrl-d:deselect-all' \
--bind 'multi:transform-footer:(( FZF_SELECT_COUNT )) && echo "Selected $FZF_SELECT_COUNT item(s)"'
```
- [Halfwidth and fullwidth alphanumeric and punctuation characters](https://en.wikipedia.org/wiki/Halfwidth_and_Fullwidth_Forms_(Unicode_block)) are now internally normalized to their ASCII equivalents to allow matching with ASCII queries.
```sh
echo ABC| fzf -q abc
```
- Renamed `clear-selection` action to `clear-multi` for consistency.
- `clear-selection` remains supported as an alias for backward compatibility.
- Bug fixes
- Fixed a bug that could cause fzf to abort due to incorrect update ordering.
- Fixed a bug where some multi-selections were lost when using `exclude` or `change-nth`.
0.63.0
------
_Release highlights: https://junegunn.github.io/fzf/releases/0.63.0/_
- Added footer. The default border style for footer is `line`, which draws a single separator line.
```sh
fzf --reverse --footer "fzf: friend zone forever"
```
- Options
- `--footer[=STRING]`
- `--footer-border[=STYLE]`
- `--footer-label=LABEL`
- `--footer-label-pos=COL[:bottom]`
- Colors
- `footer`
- `footer-bg`
- `footer-border`
- `footer-label`
- Actions
- `change-footer`
- `transform-footer`
- `bg-transform-footer`
- `change-footer-label`
- `transform-footer-label`
- `bg-transform-footer-label`
- `line` border style is now allowed for all types of border except for `--list-border`.
```sh
fzf --height 50% --style full:line --preview 'cat {}' \
--bind 'focus:bg-transform-header(file {})+bg-transform-footer(wc {})'
```
- Added `{*}` placeholder flag that evaluates to all matched items.
```bash
seq 10000 | fzf --preview "awk '{sum += \$1} END {print sum}' {*f}"
```
- Use this with caution, as it can make fzf sluggish for large lists.
- Added asynchronous transform actions with `bg-` prefix that run asynchronously in the background, along with `bg-cancel` action to cancel currently running `bg-transform` actions.
```sh
# 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 cancel 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)'
# It's okay for the commands to take a little while because they run in the background
GETTER='curl -s http://metaphorpsum.com/sentences/1'
fzf --style full --border --preview : \
--bind "focus:bg-transform-header:$GETTER" \
--bind "focus:+bg-transform-footer:$GETTER" \
--bind "focus:+bg-transform-border-label:$GETTER" \
--bind "focus:+bg-transform-preview-label:$GETTER" \
--bind "focus:+bg-transform-input-label:$GETTER" \
--bind "focus:+bg-transform-list-label:$GETTER" \
--bind "focus:+bg-transform-header-label:$GETTER" \
--bind "focus:+bg-transform-footer-label:$GETTER" \
--bind "focus:+bg-transform-ghost:$GETTER" \
--bind "focus:+bg-transform-prompt:$GETTER"
```
- Added support for full-line background color in the list section
```sh
for i in $(seq 16 255); do
echo -e "\x1b[48;5;${i}m\x1b[0Khello"
done | fzf --ansi
```
- SSH completion enhancements by @akinomyoga
- Bug fixes and improvements
0.62.0
------
- Relaxed the `--color` option syntax to allow whitespace-separated entries (in addition to commas), making multi-line definitions easier to write and read
```sh
# seoul256-light
fzf --style full --color='
fg:#616161 fg+:#616161
bg:#ffffff bg+:#e9e9e9 alt-bg:#f1f1f1
hl:#719872 hl+:#719899
pointer:#e12672 marker:#e17899
header:#719872
spinner:#719899 info:#727100
prompt:#0099bd query:#616161
border:#e1e1e1
'
```
- Added `alt-bg` color to create striped lines to visually separate rows
```sh
fzf --color bg:237,alt-bg:238,current-bg:236 --highlight-line
declare -f | perl -0777 -pe 's/^}\n/}\0/gm' |
bat --plain --language bash --color always |
fzf --read0 --ansi --reverse --multi \
--color bg:237,alt-bg:238,current-bg:236 --highlight-line
```
- [fish] Improvements in CTRL-R binding (@bitraid)
- You can trigger CTRL-R in the middle of a command to insert the selected item
- You can delete history items with SHIFT-DEL
- Bug fixes and improvements
- Fixed unnecessary 100ms delay after `reload` (#4364)
- Fixed `selected-bg` not applied to colored items (#4372)
0.61.3
------
- Reverted #4351 as it caused `tmux run-shell 'fzf --tmux'` to fail (#4559 #4560)
- More environment variables for child processes (#4356)
0.61.2
------
- Fixed panic when using header border without pointer/marker (@phanen)
- Fixed `--tmux` option when already inside a tmux popup (@peikk0)
- Bug fixes and improvements in CTRL-T binding of fish (#4334) (@bitraid)
- Added `--no-tty-default` option to make fzf search for the current TTY device instead of defaulting to `/dev/tty` (#4242)
0.61.1
------
- Disable bracketed-paste mode on exit. This fixes issue where pasting breaks after running fzf on old bash versions that don't support the mode.
0.61.0
------
- Added `--ghost=TEXT` to display a ghost text when the input is empty
```sh
# Display "Type to search" when the input is empty
fzf --ghost "Type to search"
```
- Added `change-ghost` and `transform-ghost` actions for dynamically changing the ghost text
- Added `change-pointer` and `transform-pointer` actions for dynamically changing the pointer sign
- Added `r` flag for placeholder expression (raw mode) for unquoted output
- Bug fixes and improvements
0.60.3
------
- Bug fixes and improvements
- [fish] Enable multiple history commands insertion (#4280) (@bitraid)
- [walker] Append '/' to directory entries on MSYS2 (#4281)
- Trim trailing whitespaces after processing ANSI sequences (#4282)
- Remove temp files before `become` when using `--tmux` option (#4283)
- Fix condition for using item numlines cache (#4285) (@alex-huff)
- Make `--accept-nth` compatible with `--select-1` (#4287)
- Increase the query length limit from 300 to 1000 (#4292)
- [windows] Prevent fzf from consuming user input while paused (#4260)
0.60.2
------
- Template for `--with-nth` and `--accept-nth` now supports `{n}` which evaluates to the zero-based ordinal index of the item
- Fixed a regression that caused the last field in the "nth" expression to be trimmed when a regular expression delimiter is used
- Thanks to @phanen for the fix
- Fixed 'jump' action when the pointer is an empty string
0.60.1
------
- Bug fixes and minor improvements
- Built-in walker now prints directory entries with a trailing slash
- Fixed a bug causing unexpected behavior with [fzf-tab](https://github.com/Aloxaf/fzf-tab). Please upgrade if you use it.
- Thanks to @alexeisersun, @bitraid, @Lompik, and @fsc0 for the contributions
0.60.0
------
_Release highlights: https://junegunn.github.io/fzf/releases/0.60.0/_
- Added `--accept-nth` for choosing output fields
```sh
ps -ef | fzf --multi --header-lines 1 | awk '{print $2}'
# Becomes
ps -ef | fzf --multi --header-lines 1 --accept-nth 2
git branch | fzf | cut -c3-
# Can be rewritten as
git branch | fzf --accept-nth -1
```
- `--accept-nth` and `--with-nth` now support a template that includes multiple field index expressions in curly braces
```sh
echo foo,bar,baz | fzf --delimiter , --accept-nth '{1}, {3}, {2}'
# foo, baz, bar
echo foo,bar,baz | fzf --delimiter , --with-nth '{1},{3},{2},{1..2}'
# foo,baz,bar,foo,bar
```
- Added `exclude` and `exclude-multi` actions for dynamically excluding items
```sh
seq 100 | fzf --bind 'ctrl-x:exclude'
# 'exclude-multi' will exclude the selected items or the current item
seq 100 | fzf --multi --bind 'ctrl-x:exclude-multi'
```
- Preview window now prints wrap indicator when wrapping is enabled
```sh
seq 100 | xargs | fzf --wrap --preview 'echo {}' --preview-window wrap
```
- Bug fixes and improvements
0.59.0
------
_Release highlights: https://junegunn.github.io/fzf/releases/0.59.0/_
- Prioritizing file name matches (#4192)
- Added a new tiebreak option `pathname` for prioritizing file name matches
- `--scheme=path` now sets `--tiebreak=pathname,length`
- fzf will automatically choose `path` scheme
* when the input is a TTY device, where fzf would start its built-in walker or run `$FZF_DEFAULT_COMMAND` which is usually a command for listing files,
* but not when `reload` or `transform` action is bound to `start` event, because in that case, fzf can't be sure of the input type.
- Added `--header-lines-border` to display header from `--header-lines` with a separate border
```sh
# Use --header-lines-border to separate two headers
ps -ef | fzf --style full --layout reverse --header-lines 1 \
--bind 'ctrl-r:reload(ps -ef)' --header 'Press CTRL-R to reload' \
--header-lines-border bottom --no-list-border
```
- `click-header` event now sets `$FZF_CLICK_HEADER_WORD` and `$FZF_CLICK_HEADER_NTH`. You can use them to implement a clickable header for changing the search scope using the new `transform-nth` action.
```sh
# Click on the header line to limit search scope
ps -ef | fzf --style full --layout reverse --header-lines 1 \
--header-lines-border bottom --no-list-border \
--color fg:dim,nth:regular \
--bind 'click-header:transform-nth(
echo $FZF_CLICK_HEADER_NTH
)+transform-prompt(
echo "$FZF_CLICK_HEADER_WORD> "
)'
```
- `$FZF_KEY` was updated to expose the type of the click. e.g. `click`, `ctrl-click`, etc. You can use it to implement a more sophisticated behavior.
- `kill` completion for bash and zsh were updated to use this feature
- Added `--no-input` option to completely disable and hide the input section
```sh
# Click header to trigger search
fzf --header '[src] [test]' --no-input --layout reverse \
--header-border bottom --input-border \
--bind 'click-header:transform-search:echo ${FZF_CLICK_HEADER_WORD:1:-1}'
# Vim-like mode switch
fzf --layout reverse-list --no-input \
--bind 'j:down,k:up,/:show-input+unbind(j,k,/)' \
--bind 'enter,esc,ctrl-c:transform:
if [[ $FZF_INPUT_STATE = enabled ]]; then
echo "rebind(j,k,/)+hide-input"
elif [[ $FZF_KEY = enter ]]; then
echo accept
else
echo abort
fi
'
```
- You can later show the input section using `show-input` or `toggle-input` action, and hide it again using `hide-input`, or `toggle-input`.
- Extended `{q}` placeholder to support ranges. e.g. `{q:1}`, `{q:2..}`, etc.
- Added `search(...)` and `transform-search(...)` action to trigger an fzf search with an arbitrary query string. This can be used to extend the search syntax of fzf. In the following example, fzf will use the first word of the query to trigger ripgrep search, and use the rest of the query to perform fzf search within the result.
```sh
export TEMP=$(mktemp -u)
trap 'rm -f "$TEMP"' EXIT
TRANSFORMER='
rg_pat={q:1} # The first word is passed to ripgrep
fzf_pat={q:2..} # The rest are passed to fzf
if ! [[ -r "$TEMP" ]] || [[ $rg_pat != $(cat "$TEMP") ]]; then
echo "$rg_pat" > "$TEMP"
printf "reload:sleep 0.1; rg --column --line-number --no-heading --color=always --smart-case %q || true" "$rg_pat"
fi
echo "+search:$fzf_pat"
'
fzf --ansi --disabled \
--with-shell 'bash -c' \
--bind "start,change:transform:$TRANSFORMER"
```
- You can now bind actions to multiple keys and events at once by writing a comma-separated list of keys and events before the colon
```sh
# Load 'ps -ef' output on start and reload it on CTRL-R
fzf --bind 'start,ctrl-r:reload:ps -ef'
```
- `--min-height` option now takes a number followed by `+`, which tells fzf to show at least that many items in the list section. The default value is now changed to `10+`.
```sh
# You will only see the input section which takes 3 lines
fzf --style=full --height 1% --min-height 3
# You will see 3 items in the list section
fzf --style full --height 1% --min-height 3+
```
- Shell integration scripts were updated to use `--min-height 20+` by default
- `--header-lines` will be displayed at the top in `reverse-list` layout
- Added `bell` action to ring the terminal bell
```sh
# Press CTRL-Y to copy the current line to the clipboard and ring the bell
fzf --bind 'ctrl-y:execute-silent(echo -n {} | pbcopy)+bell'
```
- Added `toggle-bind` action
- Bug fixes and improvements
- Fixed fish script to support fish 3.1.2 or later (@bitraid)
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.
<img src="https://raw.githubusercontent.com/junegunn/i/master/fzf-4-borders.png" />
Also, fzf now offers "style presets" for quick customization, which can be activated using the `--style` option.
| 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"/> |
- Style presets (#4160)
- `--style=full[:BORDER_STYLE]`
- `--style=default`
- `--style=minimal`
- Border and label for the list section (#4148)
- Options
- `--list-border[=STYLE]`
- `--list-label=LABEL`
- `--list-label-pos=COL[:bottom]`
- Colors
- `list-fg`
- `list-bg`
- `list-border`
- `list-label`
- Actions
- `change-list-label`
- `transform-list-label`
- Border and label for the input section (prompt line and info line) (#4154)
- Options
- `--input-border[=STYLE]`
- `--input-label=LABEL`
- `--input-label-pos=COL[:bottom]`
- Colors
- `input-fg` (`query`)
- `input-bg`
- `input-border`
- `input-label`
- Actions
- `change-input-label`
- `transform-input-label`
- Border and label for the header section (#4159)
- Options
- `--header-border[=STYLE]`
- `--header-label=LABEL`
- `--header-label-pos=COL[:bottom]`
- Colors
- `header-fg` (`header`)
- `header-bg`
- `header-border`
- `header-label`
- Actions
- `change-header-label`
- `transform-header-label`
- Added `--preview-border[=STYLE]` as short for `--preview-window=border[-STYLE]`
- Added new preview border style `line` which draws a single separator line between the preview window and the rest of the interface
- fzf will now render a dashed line (`┈┈`) in each `--gap` for better visual separation.
```sh
# All bash/zsh functions, highlighted
declare -f |
perl -0 -pe 's/^}\n/}\0/gm' |
bat --plain --language bash --color always |
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.
```sh
fzf --tmux border-native --bind 'enter:execute:less {}'
```
- Added `toggle-multi-line` action
- Added `toggle-hscroll` action
- Added `change-nth` action for dynamically changing the value of the `--nth` option
```sh
# Start with --nth 1, then 2, then 3, then back to the default, 1
echo 'foo foobar foobarbaz' | fzf --bind 'space:change-nth(2|3|)' --nth 1 -q foo
```
- `--nth` parts of each line can now be rendered in a different text style
```sh
# nth in a different style
ls -al | fzf --nth -1 --color nth:italic
ls -al | fzf --nth -1 --color nth:reverse
ls -al | fzf --nth -1 --color nth:reverse:bold
# Dim the other parts
ls -al | fzf --nth -1 --color nth:regular,fg:dim
# With 'change-nth'. The current nth option is exported as $FZF_NTH.
ps -ef | fzf --reverse --header-lines 1 --header-border bottom --input-border \
--color nth:regular,fg:dim \
--bind 'ctrl-n:change-nth(8..|1|2|3|4|5|6|7|)' \
--bind 'result:transform-prompt:echo "${FZF_NTH}> "'
```
- 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 and improvements in fish scripts (thanks to @bitraid)
0.57.0
------
- You can now resize the preview window by dragging the border
- Built-in walker improvements
- `--walker-root` can take multiple directory arguments. e.g. `--walker-root include src lib`
- `--walker-skip` can handle multi-component patterns. e.g. `--walker-skip target/build`
- Removed long processing delay when displaying images in the preview window
- `FZF_PREVIEW_*` environment variables are exported to all child processes (#4098)
- Bug fixes in fish scripts
0.56.3
------
- Bug fixes in zsh scripts
- fix(zsh): handle backtick trigger edge case (#4090)
- revert(zsh): remove 'fc -RI' call in the history widget (#4093)
- Thanks to @LangLangBart for the contributions
0.56.2
------
- Bug fixes
- Fixed abnormal scrolling behavior when `--wrap` is set (#4083)
- [zsh] Fixed warning message when `ksh_arrays` is set (#4084)
0.56.1
------
- Bug fixes and improvements
- Fixed a race condition which would cause fzf to present stale results after `reload` (#4070)
- `page-up` and `page-down` actions now work correctly with multi-line items (#4069)
- `{n}` is allowed in `SCROLL` expression in `--preview-window` (#4079)
- [zsh] Fixed regression in history loading with shared option (#4071)
- [zsh] Better command extraction in zsh completion (#4082)
- Thanks to @LangLangBart, @jaydee-coder, @alex-huff, and @vejkse for the contributions
0.56.0
------
- Added `--gap[=N]` option to display empty lines between items.
- This can be useful to visually separate adjacent multi-line items.
```sh
# All bash functions, highlighted
declare -f | perl -0777 -pe 's/^}\n/}\0/gm' |
bat --plain --language bash --color always |
fzf --read0 --ansi --reverse --multi --highlight-line --gap
```
- Or just to make the list easier to read. For single-line items, you probably want to set `--color gutter:-1` as well to hide the gutter.
```sh
fzf --info inline-right --gap --color gutter:-1
```
- Added `noinfo` option to `--preview-window` to hide the scroll indicator in the preview window
- Bug fixes
- Thanks to @LangLangBart, @akinomyoga, and @charlievieth for fixing the bugs
0.55.0
------
_Release highlights: https://junegunn.github.io/fzf/releases/0.55.0/_
- Added `exact-boundary-match` type to the search syntax. When a search term is single-quoted, fzf will search for the exact occurrences of the string with both ends at word boundaries.
```sh
fzf --query "'here'" << EOF
come here
not there
EOF
```
- [bash] Fuzzy path completion is enabled for all commands
- 1. If the default completion is not already set
- 2. And if the current bash supports `complete -D` option
- However, fuzzy completion for some commands can be "dynamically" disabled by the dynamic completion loader
- See the comment in `__fzf_default_completion` function for more information
- Comments are now allowed in `$FZF_DEFAULT_OPTS` and `$FZF_DEFAULT_OPTS_FILE`
```sh
export FZF_DEFAULT_OPTS='
# Layout options
--layout=reverse
--info=inline-right # Show info on the right side of the prompt line
# ...
'
```
- Hyperlinks (OSC 8) are now supported in the preview window and in the main window
```sh
printf '<< \e]8;;http://github.com/junegunn/fzf\e\\Link to \e[32mfz\e[0mf\e]8;;\e\\ >>' | fzf --ansi
fzf --preview "printf '<< \e]8;;http://github.com/junegunn/fzf\e\\Link to \e[32mfz\e[0mf\e]8;;\e\\ >>'"
```
- The default `--ellipsis` is now `··` instead of `..`.
- [vim] A spec can have `exit` callback that is called with the exit status of fzf
- This can be used to clean up temporary resources or restore the original state when fzf is closed without a selection
- Fixed `--tmux bottom` when the status line is not at the bottom
- Fixed extra scroll offset in multi-line mode (`--read0` or `--wrap`)
- Added fallback `ps` command for `kill` completion on Cygwin
0.54.3
------
- Fixed incompatibility of adaptive height specification and 'start:reload'
```sh
# A regression in 0.54.0 would cause this to fail
fzf --height '~100%' --bind 'start:reload:seq 10'
```
- Environment variables are now available to `$FZF_DEFAULT_COMMAND`
```sh
FZF_DEFAULT_COMMAND='echo $FZF_QUERY' fzf --query foo
```
0.54.2
------
- Fixed incorrect syntax highlighting of truncated multi-line entries
- Updated GoReleaser to 2.1.0 to simplify notarization of macOS binaries
- macOS archives will be in `tar.gz` format instead of `zip` format since we no longer notarize the zip files but binaries
- (Windows) Reverted a mintty fix in 0.54.0
- As a result, mouse may not work on mintty in fullscreen mode. However, fzf will correctly read non-ASCII input in fullscreen mode (`--no-height`).
- fzf unfortunately cannot read non-ASCII input when not in fullscreen mode on Windows. So if you need to input non-ASCII characters, add `--no-height` to your `$FZF_DEFAULT_OPTS`.
- Any help in fixing this issue will be appreciated (#3799, #3847).
0.54.1
------
- Updated [fastwalk](https://github.com/charlievieth/fastwalk) dependency for built-in directory walker
- [fastwalk: add optional sorting and improve documentation](https://github.com/charlievieth/fastwalk/pull/27)
- [fastwalk: only check if MSYSTEM is set during MSYS/MSYS2](https://github.com/charlievieth/fastwalk/pull/28)
- Thanks to @charlievieth
- Reverted ALT-C binding of fish to use `cd` instead of `builtin cd`
- `builtin cd` was introduced to work around a bug of `cd` coming from `zoxide init --cmd cd fish` where it cannot handle `--` argument.
- However, the default `cd` of fish is actually a wrapper function for supporting `cd -`, so we want to use it instead.
- See [#3928](https://github.com/junegunn/fzf/pull/3928) for more information and consider helping zoxide fix the bug.
0.54.0
------
_Release highlights: https://junegunn.github.io/fzf/releases/0.54.0/_
- Implemented line wrap of long items
- `--wrap` option enables line wrap
- `--wrap-sign` customizes the sign for wrapped lines (default: `↳ `)
- `toggle-wrap` action toggles line wrap
```sh
history | fzf --tac --wrap --bind 'ctrl-/:toggle-wrap' --wrap-sign $'\t↳ '
```
- fzf by default binds `CTRL-/` and `ALT-/` to `toggle-wrap`
- Updated shell integration scripts to leverage line wrap
- CTRL-R binding includes `--wrap-sign $'\t↳ '` to indent wrapped lines
- `kill **` completion uses `--wrap` to show the whole line by default
instead of showing it in the preview window
- Added `--info-command` option for customizing the info line
```sh
# Prepend the current cursor position in yellow
fzf --info-command='echo -e "\x1b[33;1m$FZF_POS\x1b[m/$FZF_INFO 💛"'
```
- `$FZF_INFO` is set to the original info text
- ANSI color codes are supported
- Pointer and marker signs can be set to empty strings
```sh
# Minimal style
fzf --pointer '' --marker '' --prompt '' --info hidden
```
- Better cache management and improved rendering for `--tail`
- Improved `--sync` behavior
- When `--sync` is provided, fzf will not render the interface until the initial filtering and the associated actions (bound to any of `start`, `load`, `result`, or `focus`) are complete.
```sh
# fzf will not render intermediate states
(sleep 1; seq 1000000; sleep 1) |
fzf --sync --query 5 --listen --bind start:up,load:up,result:up,focus:change-header:Ready
```
- GET endpoint is now available from `execute` and `transform` actions (it used to timeout due to lock conflict)
```sh
fzf --listen --sync --bind 'focus:transform-header:curl -s localhost:$FZF_PORT?limit=0 | jq .'
```
- Added `offset-middle` action to place the current item is in the middle of the screen
- fzf will not start the initial reader when `reload` or `reload-sync` is bound to `start` event. `fzf < /dev/null` or `: | fzf` are no longer required and extraneous `load` event will not fire due to the empty list.
```sh
# Now this will work as expected. Previously, this would print an invalid header line.
# `fzf < /dev/null` or `: | fzf` would fix the problem, but then an extraneous
# `load` event would fire and the header would be prematurely updated.
fzf --header 'Loading ...' --header-lines 1 \
--bind 'start:reload:sleep 1; ps -ef' \
--bind 'load:change-header:Loaded!'
```
- Fixed mouse support on Windows
- Fixed crash when using `--tiebreak=end` with very long items
- zsh 5.0 compatibility (thanks to @LangLangBart)
- Fixed `--walker-skip` to also skip symlinks to directories
- Fixed `result` event not fired when input stream is not complete
- New tags will have `v` prefix so that they are available on https://proxy.golang.org/
0.53.0
------
_Release highlights: https://junegunn.github.io/fzf/releases/0.53.0/_
- Multi-line display
- See [Processing multi-line items](https://junegunn.github.io/fzf/tips/processing-multi-line-items/)
- fzf can now display multi-line items
```sh
# All bash functions, highlighted
declare -f | perl -0777 -pe 's/^}\n/}\0/gm' |
bat --plain --language bash --color always |
fzf --read0 --ansi --reverse --multi --highlight-line
# Ripgrep multi-line output
rg --pretty bash | perl -0777 -pe 's/\n\n/\n\0/gm' |
fzf --read0 --ansi --multi --highlight-line --reverse --tmux 70%
```
- To disable multi-line display, use `--no-multi-line`
- CTRL-R bindings of bash, zsh, and fish have been updated to leverage multi-line display
- The default `--pointer` and `--marker` have been changed from `>` to Unicode bar characters as they look better with multi-line items
- Added `--marker-multi-line` to customize the select marker for multi-line entries with the default set to `╻┃╹`
```
╻First line
┃...
╹Last line
```
- Native tmux integration
- Added `--tmux` option to replace fzf-tmux script and simplify distribution
```sh
# --tmux [center|top|bottom|left|right][,SIZE[%]][,SIZE[%]]
# Center, 100% width and 70% height
fzf --tmux 100%,70% --border horizontal --padding 1,2
# Left, 30% width
fzf --tmux left,30%
# Bottom, 50% height
fzf --tmux bottom,50%
```
- To keep the implementation simple, it only uses popups. You need tmux 3.3 or later.
- To use `--tmux` in Vim plugin:
```vim
let g:fzf_layout = { 'tmux': '100%,70%' }
```
- Added support for endless input streams
- See [Browsing log stream with fzf](https://junegunn.github.io/fzf/tips/browsing-log-streams/)
- Added `--tail=NUM` option to limit the number of items to keep in memory. This is useful when you want to browse an endless stream of data (e.g. log stream) with fzf while limiting memory usage.
```sh
# Interactive filtering of a log stream
tail -f *.log | fzf --tail 100000 --tac --no-sort --exact
```
- Better Windows Support
- fzf now works on Git bash (mintty) out of the box via winpty integration
- Many fixes and improvements for Windows
- man page is now embedded in the binary; `fzf --man` to see it
- Changed the default `--scroll-off` to 3, as we think it's a better default
- Process started by `execute` action now directly writes to and reads from `/dev/tty`. Manual `/dev/tty` redirection for interactive programs is no longer required.
```sh
# Vim will work fine without /dev/tty redirection
ls | fzf --bind 'space:execute:vim {}' > selected
```
- Added `print(...)` action to queue an arbitrary string to be printed on exit. This was mainly added to work around the limitation of `--expect` where it's not compatible with `--bind` on the same key and it would ignore other actions bound to it.
```sh
# This doesn't work as expected because --expect is not compatible with --bind
fzf --multi --expect ctrl-y --bind 'ctrl-y:select-all'
# This is something you can do instead
fzf --multi --bind 'enter:print()+accept,ctrl-y:select-all+print(ctrl-y)+accept'
```
- We also considered making them compatible, but realized that some users may have been relying on the current behavior.
- [`NO_COLOR`](https://no-color.org/) environment variable is now respected. If the variable is set, fzf defaults to `--no-color` unless otherwise specified.
0.52.1
------
- Fixed a critical bug in the Windows version
- Windows users are strongly encouraged to upgrade to this version
0.52.0
------
- Added `--highlight-line` to highlight the whole current line (à la `set cursorline` of Vim)
- Added color names for selected lines: `selected-fg`, `selected-bg`, and `selected-hl`
```sh
fzf --border --multi --info inline-right --layout reverse --marker ▏ --pointer ▌ --prompt '▌ ' \
--highlight-line --color gutter:-1,selected-bg:238,selected-fg:146,current-fg:189
```
- Added `click-header` event that is triggered when the header section is clicked. When the event is triggered, `$FZF_CLICK_HEADER_COLUMN` and `$FZF_CLICK_HEADER_LINE` are set.
```sh
fd --type f |
fzf --header $'[Files] [Directories]' --header-first \
--bind 'click-header:transform:
(( FZF_CLICK_HEADER_COLUMN <= 7 )) && echo "reload(fd --type f)"
(( FZF_CLICK_HEADER_COLUMN >= 9 )) && echo "reload(fd --type d)"
'
```
- Add `$FZF_COMPLETION_{DIR,PATH}_OPTS` for separately customizing the behavior of fuzzy completion
```sh
# Set --walker options without 'follow' not to follow symbolic links
FZF_COMPLETION_PATH_OPTS="--walker=file,dir,hidden"
FZF_COMPLETION_DIR_OPTS="--walker=dir,hidden"
```
- Fixed Windows argument escaping
- Bug fixes and improvements
- The code was heavily refactored to allow using fzf as a library in Go programs. The API is still experimental and subject to change.
- https://gist.github.com/junegunn/193990b65be48a38aac6ac49d5669170
0.51.0
------
- Added a new environment variable `$FZF_POS` exported to the child processes. It's the vertical position of the cursor in the list starting from 1.
```sh
# Toggle selection to the top or to the bottom
seq 30 | fzf --multi --bind 'load:pos(10)' \
--bind 'shift-up:transform:for _ in $(seq $FZF_POS $FZF_MATCH_COUNT); do echo -n +toggle+up; done' \
--bind 'shift-down:transform:for _ in $(seq 1 $FZF_POS); do echo -n +toggle+down; done'
```
- Added `--with-shell` option to start child processes with a custom shell command and flags
```sh
gem list | fzf --with-shell 'ruby -e' \
--preview 'pp Gem::Specification.find_by_name({1})' \
--bind 'ctrl-o:execute-silent:
spec = Gem::Specification.find_by_name({1})
[spec.homepage, *spec.metadata.filter { _1.end_with?("uri") }.values].uniq.each do
system "open", _1
end
'
```
- Added `change-multi` action for dynamically changing `--multi` option
- `change-multi` - enable multi-select mode with no limit
- `change-multi(NUM)` - enable multi-select mode with a limit
- `change-multi(0)` - disable multi-select mode
- Windows improvements
- `become` action is now supported on Windows
- Unlike in *nix, this does not use `execve(2)`. Instead it spawns a new process and waits for it to finish, so the exact behavior may differ.
- Fixed argument escaping for Windows cmd.exe. No redundant escaping of backslashes.
- Bug fixes and improvements
0.50.0
------
- Search performance optimization. You can observe 50%+ improvement in some scenarios.
```
$ rg --line-number --no-heading --smart-case . > $DATA
$ wc < $DATA
5520118 26862362 897487793
$ hyperfine -w 1 -L bin fzf-0.49.0,fzf-7ce6452,fzf-a5447b8,fzf '{bin} --filter "///" < $DATA | head -30'
Summary
fzf --filter "///" < $DATA | head -30 ran
1.16 ± 0.03 times faster than fzf-a5447b8 --filter "///" < $DATA | head -30
1.23 ± 0.03 times faster than fzf-7ce6452 --filter "///" < $DATA | head -30
1.52 ± 0.03 times faster than fzf-0.49.0 --filter "///" < $DATA | head -30
```
- Added `jump` and `jump-cancel` events that are triggered when leaving `jump` mode
```sh
# Default behavior
fzf --bind space:jump
# Same as jump-accept action
fzf --bind space:jump,jump:accept
# Accept on jump, abort on cancel
fzf --bind space:jump,jump:accept,jump-cancel:abort
# Change header on jump-cancel
fzf --bind 'space:change-header(Type jump label)+jump,jump-cancel:change-header:Jump cancelled'
```
- Added a new environment variable `$FZF_KEY` exported to the child processes. It's the name of the last key pressed.
```sh
fzf --bind 'space:jump,jump:accept,jump-cancel:transform:[[ $FZF_KEY =~ ctrl-c ]] && echo abort'
```
- fzf can be built with profiling options. See [BUILD.md](BUILD.md) for more information.
- Bug fixes
0.49.0
------
- Ingestion performance improved by around 40% (more or less depending on options)
- `--info=hidden` and `--info=inline-right` will no longer hide the horizontal separator by default. This gives you more flexibility in customizing the layout.
```sh
fzf --border --info=inline-right
fzf --border --info=inline-right --separator ═
fzf --border --info=inline-right --no-separator
fzf --border --info=hidden
fzf --border --info=hidden --separator ━
fzf --border --info=hidden --no-separator
```
- Added two environment variables exported to the child processes
- `FZF_PREVIEW_LABEL`
- `FZF_BORDER_LABEL`
```sh
# Use the current value of $FZF_PREVIEW_LABEL to determine which actions to perform
git ls-files |
fzf --header 'Press CTRL-P to change preview mode' \
--bind='ctrl-p:transform:[[ $FZF_PREVIEW_LABEL =~ cat ]] \
&& echo "change-preview(git log --color=always \{})+change-preview-label([[ log ]])" \
|| echo "change-preview(bat --color=always \{})+change-preview-label([[ cat ]])"'
```
- Renamed `track` action to `track-current` to highlight the difference between the global tracking state set by `--track` and a one-off tracking action
- `track` is still available as an alias
- Added `untrack-current` and `toggle-track-current` actions
- `*-current` actions are no-op when the global tracking state is set
- Bug fixes and minor improvements
0.48.1
------
- CTRL-T and ALT-C bindings can be disabled by setting `FZF_CTRL_T_COMMAND` and `FZF_ALT_C_COMMAND` to empty strings respectively when sourcing the script
```sh
# bash
FZF_CTRL_T_COMMAND= FZF_ALT_C_COMMAND= eval "$(fzf --bash)"
# zsh
FZF_CTRL_T_COMMAND= FZF_ALT_C_COMMAND= eval "$(fzf --zsh)"
# fish
fzf --fish | FZF_CTRL_T_COMMAND= FZF_ALT_C_COMMAND= source
```
- Setting the variables after sourcing the script will have no effect
- Bug fixes
0.48.0
------
- Shell integration scripts are now embedded in the fzf binary. This simplifies the distribution, and the users are less likely to have problems caused by using incompatible scripts and binaries.
- bash
```sh
# Set up fzf key bindings and fuzzy completion
eval "$(fzf --bash)"
```
- zsh
```sh
# Set up fzf key bindings and fuzzy completion
eval "$(fzf --zsh)"
```
- fish
```fish
# Set up fzf key bindings
fzf --fish | source
```
- Added options for customizing the behavior of the built-in walker
| Option | Description | Default |
| --- | --- | --- |
| `--walker=OPTS` | Walker options (`[file][,dir][,follow][,hidden]`) | `file,follow,hidden` |
| `--walker-root=DIR` | Root directory from which to start walker | `.` |
| `--walker-skip=DIRS` | Comma-separated list of directory names to skip | `.git,node_modules` |
- Examples
```sh
# Built-in walker is only used by standalone fzf when $FZF_DEFAULT_COMMAND is not set
unset FZF_DEFAULT_COMMAND
fzf # default: --walker=file,follow,hidden --walker-root=. --walker-skip=.git,node_modules
fzf --walker=file,dir,hidden,follow --walker-skip=.git,node_modules,target
# Walker options in $FZF_DEFAULT_OPTS
export FZF_DEFAULT_OPTS="--walker=file,dir,hidden,follow --walker-skip=.git,node_modules,target"
fzf
# Reading from STDIN; --walker is ignored
seq 100 | fzf --walker=dir
# Reading from $FZF_DEFAULT_COMMAND; --walker is ignored
export FZF_DEFAULT_COMMAND='seq 100'
fzf --walker=dir
```
- Shell integration scripts have been updated to use the built-in walker with these new options and they are now much faster out of the box.
0.47.0
------
- Replaced ["the default find command"][find] with a built-in directory walker to simplify the code and to achieve better performance and consistent behavior across platforms.
This doesn't affect you if you have `$FZF_DEFAULT_COMMAND` set.
- Breaking changes:
- Unlike [the previous "find" command][find], the new traversal code will list hidden files, but hidden directories will still be ignored
- No filtering of `devtmpfs` or `proc` types
- Traversal is parallelized, so the order of the entries will be different each time
- You may wonder why fzf implements directory walker anyway when it's a filter program following the [Unix philosophy][unix].
But fzf has had [the walker code for years][walker] to tackle the performance problem on Windows. And I decided to use the same approach on different platforms as well for the benefits listed above.
- Built-in walker is using the excellent [charlievieth/fastwalk][fastwalk] library, which easily outperforms its competitors and supports safely following symlinks.
- Added `$FZF_DEFAULT_OPTS_FILE` to allow managing default options in a file
- See [#3618](https://github.com/junegunn/fzf/pull/3618)
- Option precedence from lower to higher
1. Options read from `$FZF_DEFAULT_OPTS_FILE`
1. Options from `$FZF_DEFAULT_OPTS`
1. Options from command-line arguments
- Bug fixes and improvements
[find]: https://github.com/junegunn/fzf/blob/0.46.1/src/constants.go#L60-L64
[walker]: https://github.com/junegunn/fzf/pull/1847
[fastwalk]: https://github.com/charlievieth/fastwalk
[unix]: https://en.wikipedia.org/wiki/Unix_philosophy
0.46.1
------
- Bug fixes and improvements
- Fixed Windows binaries
- Downgraded Go version to 1.20 to support older versions of Windows
- https://tip.golang.org/doc/go1.21#windows
- Updated [rivo/uniseg](https://github.com/rivo/uniseg) dependency to v0.4.6
0.46.0
------
- Added two new events
- `result` - triggered when the filtering for the current query is complete and the result list is ready
- `resize` - triggered when the terminal size is changed
- fzf now exports the following environment variables to the child processes
| Variable | Description |
| --- | --- |
| `FZF_LINES` | Number of lines fzf takes up excluding padding and margin |
| `FZF_COLUMNS` | Number of columns fzf takes up excluding padding and margin |
| `FZF_TOTAL_COUNT` | Total number of items |
| `FZF_MATCH_COUNT` | Number of matched items |
| `FZF_SELECT_COUNT` | Number of selected items |
| `FZF_QUERY` | Current query string |
| `FZF_PROMPT` | Prompt string |
| `FZF_ACTION` | The name of the last action performed |
- This allows you to write sophisticated transformations like so
```sh
# Script to dynamically resize the preview window
transformer='
# 1 line for info, another for prompt, and 2 more lines for preview window border
lines=$(( FZF_LINES - FZF_MATCH_COUNT - 4 ))
if [[ $FZF_MATCH_COUNT -eq 0 ]]; then
echo "change-preview-window:hidden"
elif [[ $lines -gt 3 ]]; then
echo "change-preview-window:$lines"
elif [[ $FZF_PREVIEW_LINES -ne 3 ]]; then
echo "change-preview-window:3"
fi
'
seq 10000 | fzf --preview 'seq {} 10000' --preview-window up \
--bind "result:transform:$transformer" \
--bind "resize:transform:$transformer"
```
- And we're phasing out `{fzf:prompt}` and `{fzf:action}`
- Changed [mattn/go-runewidth](https://github.com/mattn/go-runewidth) dependency to [rivo/uniseg](https://github.com/rivo/uniseg) for accurate results
- Set `--ambidouble` if your terminal displays ambiguous width characters (e.g. box-drawing characters for borders) as 2 columns
- `RUNEWIDTH_EASTASIAN=1` is still respected for backward compatibility, but it's recommended that you use this new option instead
- Bug fixes
0.45.0
------
- Added `transform` action to conditionally perform a series of actions
```sh
# Disallow selecting an empty line
echo -e "1. Hello\n2. Goodbye\n\n3. Exit" |
fzf --height '~100%' --reverse --header 'Select one' \
--bind 'enter:transform:[[ -n {} ]] && echo accept || echo "change-header:Invalid selection"'
# Move cursor past the empty line
echo -e "1. Hello\n2. Goodbye\n\n3. Exit" |
fzf --height '~100%' --reverse --header 'Select one' \
--bind 'enter:transform:[[ -n {} ]] && echo accept || echo "change-header:Invalid selection"' \
--bind 'focus:transform:[[ -n {} ]] && exit; [[ {fzf:action} =~ up$ ]] && echo up || echo down'
# A single key binding to toggle between modes
fd --type file |
fzf --prompt 'Files> ' \
--header 'CTRL-T: Switch between Files/Directories' \
--bind 'ctrl-t:transform:[[ ! {fzf:prompt} =~ Files ]] &&
echo "change-prompt(Files> )+reload(fd --type file)" ||
echo "change-prompt(Directories> )+reload(fd --type directory)"'
```
- Added placeholder expressions
- `{fzf:action}` - The name of the last action performed
- `{fzf:prompt}` - Prompt string (including ANSI color codes)
- `{fzf:query}` - Synonym for `{q}`
- Added support for negative height
```sh
# Terminal height minus 1, so you can still see the command line
fzf --height=-1
```
- This handles a terminal resize better than `--height=$(($(tput lines) - 1))`
- Added `accept-or-print-query` action that acts like `accept` but prints the
current query when there's no match for the query
```sh
# You can make CTRL-R paste the current query when there's no match
export FZF_CTRL_R_OPTS='--bind enter:accept-or-print-query'
```
- Note that there are alternative ways to implement the same strategy
```sh
# 'become' is apparently more versatile but it's not available on Windows.
export FZF_CTRL_R_OPTS='--bind "enter:become:if [ -z {} ]; then echo {q}; else echo {}; fi"'
# Using the new 'transform' action
export FZF_CTRL_R_OPTS='--bind "enter:transform:[ -z {} ] && echo print-query || echo accept"'
```
- Added `show-header` and `hide-header` actions
- Bug fixes
0.44.1
------
- Fixed crash when preview window is hidden on `focus` event
0.44.0
------
- (Experimental) Sixel image support in preview window (not available on Windows)
- [bin/fzf-preview.sh](bin/fzf-preview.sh) is added to demonstrate how to
display an image using Kitty image protocol or Sixel. You can use it
like so:
```sh
fzf --preview='fzf-preview.sh {}'
```
- (Experimental) iTerm2 inline image protocol support in preview window (not available on Windows)
```sh
# Using https://iterm2.com/utilities/imgcat
fzf --preview 'imgcat -W $FZF_PREVIEW_COLUMNS -H $FZF_PREVIEW_LINES {}'
```
- HTTP server can be configured to accept remote connections
```sh
# FZF_API_KEY is required for a non-localhost listen address
export FZF_API_KEY="$(head -c 32 /dev/urandom | base64)"
fzf --listen 0.0.0.0:6266
```
- To allow remote process execution, use `--listen-unsafe` instead
(`execute*`, `reload*`, `become`, `preview`, `change-preview`, `transform-*`)
```sh
fzf --listen-unsafe 0.0.0.0:6266
```
- Bug fixes
0.43.0
------
- (Experimental) Added support for Kitty image protocol in the preview window
(not available on Windows)
```sh
fzf --preview='
if file --mime-type {} | grep -qF image/; then
# --transfer-mode=memory is the fastest option but if you want fzf to be able
# to redraw the image on terminal resize or on 'change-preview-window',
# you need to use --transfer-mode=stream.
kitty icat --clear --transfer-mode=memory --unicode-placeholder --stdin=no --place=${FZF_PREVIEW_COLUMNS}x${FZF_PREVIEW_LINES}@0x0 {} | sed \$d
else
bat --color=always {}
fi
'
```
- (Experimental) `--listen` server can report program state in JSON format (`GET /`)
```sh
# fzf server started in "headless" mode
fzf --listen 6266 2> /dev/null
# Get program state
curl localhost:6266 | jq .
# Increase the number of items returned (default: 100)
curl localhost:6266?limit=1000 | jq .
```
- `--listen` server can be secured by setting `$FZF_API_KEY` environment
variable.
```sh
export FZF_API_KEY="$(head -c 32 /dev/urandom | base64)"
# Server
fzf --listen 6266
# Client
curl localhost:6266 -H "x-api-key: $FZF_API_KEY" -d 'change-query(yo)'
```
- Added `toggle-header` action
- Added mouse events for `--bind`
- `scroll-up` (bound to `up`)
- `scroll-down` (bound to `down`)
- `shift-scroll-up` (bound to `toggle+up`)
- `shift-scroll-down` (bound to `toggle+down`)
- `shift-left-click` (bound to `toggle`)
- `shift-right-click` (bound to `toggle`)
- `preview-scroll-up` (bound to `preview-up`)
- `preview-scroll-down` (bound to `preview-down`)
```sh
# Twice faster scrolling both in the main window and the preview window
fzf --bind 'scroll-up:up+up,scroll-down:down+down' \
--bind 'preview-scroll-up:preview-up+preview-up' \
--bind 'preview-scroll-down:preview-down+preview-down' \
--preview 'cat {}'
```
- Added `offset-up` and `offset-down` actions
```sh
# Scrolling will behave similarly to CTRL-E and CTRL-Y of vim
fzf --bind scroll-up:offset-up,scroll-down:offset-down \
--bind ctrl-y:offset-up,ctrl-e:offset-down \
--scroll-off=5
```
- Shell extensions
- Updated bash completion for fzf options
- bash key bindings no longer requires perl; it will use awk or mawk
instead if perl is not found
- Basic context-aware completion for ssh command
- Applied `--scheme=path` for better ordering of the result
- Bug fixes and improvements
0.42.0
------
- Added new info style: `--info=right`
- Added new info style: `--info=inline-right`
- Added new border style `thinblock` which uses symbols for legacy computing
[one eighth block elements](https://en.wikipedia.org/wiki/Symbols_for_Legacy_Computing)
- Similarly to `block`, this style is suitable when using a different
background color because the window is completely contained within the border.
```sh
BAT_THEME=GitHub fzf --info=right --border=thinblock --preview-window=border-thinblock \
--margin=3 --scrollbar=▏▕ --preview='bat --color=always --style=numbers {}' \
--color=light,query:238,fg:238,bg:251,bg+:249,gutter:251,border:248,preview-bg:253
```
- This style may not render correctly depending on the font and the
terminal emulator.
0.41.1
------
- Fixed a bug where preview window is not updated when `--disabled` is set and
a reload is triggered by `change:reload` binding
0.41.0
------
- Added color name `preview-border` and `preview-scrollbar`
- Added new border style `block` which uses [block elements](https://en.wikipedia.org/wiki/Block_Elements)
- `--scrollbar` can take two characters, one for the main window, the other
for the preview window
- Putting it altogether:
```sh
fzf-tmux -p 80% --padding 1,2 --preview 'bat --style=plain --color=always {}' \
--color 'bg:237,bg+:235,gutter:237,border:238,scrollbar:236' \
--color 'preview-bg:235,preview-border:236,preview-scrollbar:234' \
--preview-window 'border-block' --border block --scrollbar '▌▐'
```
- Bug fixes and improvements
0.40.0
------
- Added `zero` event that is triggered when there's no match
```sh
# Reload the candidate list when there's no match
echo $RANDOM | fzf --bind 'zero:reload(echo $RANDOM)+clear-query' --height 3
```
- New actions
- Added `track` action which makes fzf track the current item when the
search result is updated. If the user manually moves the cursor, or the
item is not in the updated search result, tracking is automatically
disabled. Tracking is useful when you want to see the surrounding items
by deleting the query string.
```sh
# Narrow down the list with a query, point to a command,
# and hit CTRL-T to see its surrounding commands.
export FZF_CTRL_R_OPTS="
--preview 'echo {}' --preview-window up:3:hidden:wrap
--bind 'ctrl-/:toggle-preview'
--bind 'ctrl-t:track+clear-query'
--bind 'ctrl-y:execute-silent(echo -n {2..} | pbcopy)+abort'
--color header:italic
--header 'Press CTRL-Y to copy command into clipboard'"
```
- Added `change-header(...)`
- Added `transform-header(...)`
- Added `toggle-track` action
- Fixed `--track` behavior when used with `--tac`
- However, using `--track` with `--tac` is not recommended. The resulting
behavior can be very confusing.
- Bug fixes and improvements
0.39.0
------
- Added `one` event that is triggered when there's only one match
```sh
# Automatically select the only match
seq 10 | fzf --bind one:accept
```
- Added `--track` option that makes fzf track the current selection when the
result list is updated. This can be useful when browsing logs using fzf with
sorting disabled.
```sh
git log --oneline --graph --color=always | nl |
fzf --ansi --track --no-sort --layout=reverse-list
```
- If you use `--listen` option without a port number fzf will automatically
allocate an available port and export it as `$FZF_PORT` environment
variable.
```sh
# Automatic port assignment
fzf --listen --bind 'start:execute-silent:echo $FZF_PORT > /tmp/fzf-port'
# Say hello
curl "localhost:$(cat /tmp/fzf-port)" -d 'preview:echo Hello, fzf is listening on $FZF_PORT.'
```
- A carriage return and a line feed character will be rendered as dim ␍ and
␊ respectively.
```sh
printf "foo\rbar\nbaz" | fzf --read0 --preview 'echo {}'
```
- fzf will stop rendering a non-displayable characters as a space. This will
likely cause less glitches in the preview window.
```sh
fzf --preview 'head -1000 /dev/random'
```
- Bug fixes and improvements
0.38.0
------
- New actions
- `become(...)` - Replace the current fzf process with the specified
command using `execve(2)` system call.
See https://github.com/junegunn/fzf#turning-into-a-different-process for
more information.
```sh
# Open selected files in Vim
fzf --multi --bind 'enter:become(vim {+})'
# Open the file in Vim and go to the line
git grep --line-number . |
fzf --delimiter : --nth 3.. --bind 'enter:become(vim {1} +{2})'
```
- This action is not supported on Windows
- `show-preview`
- `hide-preview`
- Bug fixes
- `--preview-window 0,hidden` should not execute the preview command until
`toggle-preview` action is triggered
0.37.0
------
- Added a way to customize the separator of inline info
```sh
fzf --info 'inline: ╱ ' --prompt '╱ ' --color prompt:bright-yellow
```
- New event
- `focus` - Triggered when the focus changes due to a vertical cursor
movement or a search result update
```sh
fzf --bind 'focus:transform-preview-label:echo [ {} ]' --preview 'cat {}'
# Any action bound to the event runs synchronously and thus can make the interface sluggish
# e.g. lolcat isn't one of the fastest programs, and every cursor movement in
# fzf will be noticeably affected by its execution time
fzf --bind 'focus:transform-preview-label:echo [ {} ] | lolcat -f' --preview 'cat {}'
# Beware not to introduce an infinite loop
seq 10 | fzf --bind 'focus:up' --cycle
```
- New actions
- `change-border-label`
- `change-preview-label`
- `transform-border-label`
- `transform-preview-label`
- Bug fixes and improvements
0.36.0
------
- Added `--listen=HTTP_PORT` option to start HTTP server. It allows external
processes to send actions to perform via POST method.
```sh
# Start HTTP server on port 6266
fzf --listen 6266
# Send actions to the server
curl -XPOST localhost:6266 -d 'reload(seq 100)+change-prompt(hundred> )'
```
- Added draggable scrollbar to the main search window and the preview window
```sh
# Hide scrollbar
fzf --no-scrollbar
# Customize scrollbar
fzf --scrollbar ┆ --color scrollbar:blue
```
- New event
- Added `load` event that is triggered when the input stream is complete
and the initial processing of the list is complete.
```sh
# Change the prompt to "loaded" when the input stream is complete
(seq 10; sleep 1; seq 11 20) | fzf --prompt 'Loading> ' --bind 'load:change-prompt:Loaded> '
# You can use it instead of 'start' event without `--sync` if asynchronous
# trigger is not an issue.
(seq 10; sleep 1; seq 11 20) | fzf --bind 'load:last'
```
- New actions
- Added `pos(...)` action to move the cursor to the numeric position
- `first` and `last` are equivalent to `pos(1)` and `pos(-1)` respectively
```sh
# Put the cursor on the 10th item
seq 100 | fzf --sync --bind 'start:pos(10)'
# Put the cursor on the 10th to last item
seq 100 | fzf --sync --bind 'start:pos(-10)'
```
- Added `reload-sync(...)` action which replaces the current list only after
the reload process is complete. This is useful when the command takes
a while to produce the initial output and you don't want fzf to run against
an empty list while the command is running.
```sh
# You can still filter and select entries from the initial list for 3 seconds
seq 100 | fzf --bind 'load:reload-sync(sleep 3; seq 1000)+unbind(load)'
```
- Added `next-selected` and `prev-selected` actions to move between selected
items
```sh
# `next-selected` will move the pointer to the next selected item below the current line
# `prev-selected` will move the pointer to the previous selected item above the current line
seq 10 | fzf --multi --bind ctrl-n:next-selected,ctrl-p:prev-selected
# Both actions respect --layout option
seq 10 | fzf --multi --bind ctrl-n:next-selected,ctrl-p:prev-selected --layout reverse
```
- Added `change-query(...)` action that simply changes the query string to the
given static string. This can be useful when used with `--listen`.
```sh
curl localhost:6266 -d "change-query:$(date)"
```
- Added `transform-prompt(...)` action for transforming the prompt string
using an external command
```sh
# Press space to change the prompt string using an external command
# (only the first line of the output is taken)
fzf --bind 'space:reload(ls),load:transform-prompt(printf "%s> " "$(date)")'
```
- Added `transform-query(...)` action for transforming the query string using
an external command
```sh
# Press space to convert the query to uppercase letters
fzf --bind 'space:transform-query(tr "[:lower:]" "[:upper:]" <<< {q})'
# Bind it to 'change' event for automatic conversion
fzf --bind 'change:transform-query(tr "[:lower:]" "[:upper:]" <<< {q})'
# Can only type numbers
fzf --bind 'change:transform-query(sed "s/[^0-9]//g" <<< {q})'
```
- `put` action can optionally take an argument string
```sh
# a will put 'alpha' on the prompt, ctrl-b will put 'bravo'
fzf --bind 'a:put+put(lpha),ctrl-b:put(bravo)'
```
- Added color name `preview-label` for `--preview-label` (defaults to `label`
for `--border-label`)
- Better support for (Windows) terminals where each box-drawing character
takes 2 columns. Set `RUNEWIDTH_EASTASIAN` environment variable to `0` or `1`.
- On Vim, the variable will be automatically set if `&ambiwidth` is `double`
- Behavior changes
- fzf will always execute the preview command if the command template
contains `{q}` even when it's empty. If you prefer the old behavior,
you'll have to check if `{q}` is empty in your command.
```sh
# This will show // even when the query is empty
: | fzf --preview 'echo /{q}/'
# But if you don't want it,
: | fzf --preview '[ -n {q} ] || exit; echo /{q}/'
```
- `double-click` will behave the same as `enter` unless otherwise specified,
so you don't have to repeat the same action twice in `--bind` in most cases.
```sh
# No need to bind 'double-click' to the same action
fzf --bind 'enter:execute:less {}' # --bind 'double-click:execute:less {}'
```
- If the color for `separator` is not specified, it will default to the
color for `border`. Same holds true for `scrollbar`. This is to reduce
the number of configuration items required to achieve a consistent color
scheme.
- If `follow` flag is specified in `--preview-window` option, fzf will
automatically scroll to the bottom of the streaming preview output. But
when the user manually scrolls the window, the following stops. With
this version, fzf will resume following if the user scrolls the window
to the bottom.
- Default border style on Windows is changed to `sharp` because some
Windows terminals are not capable of displaying `rounded` border
characters correctly.
- Minor bug fixes and improvements
0.35.1
------
- Fixed a bug where fzf with `--tiebreak=chunk` crashes on inverse match query
- Fixed a bug where clicking above fzf would paste escape sequences
0.35.0
------
- Added `start` event that is triggered only once when fzf finder starts.
Since fzf consumes the input stream asynchronously, the input list is not
available unless you use `--sync`.
```sh
seq 100 | fzf --multi --sync --bind 'start:last+select-all+preview(echo welcome)'
```
- Added `--border-label` and `--border-label-pos` for putting label on the border
```sh
# ANSI color codes are supported
# (with https://github.com/busyloop/lolcat)
label=$(curl -s http://metaphorpsum.com/sentences/1 | lolcat -f)
# Border label at the center
fzf --height=10 --border --border-label="╢ $label ╟" --color=label:italic:black
# Left-aligned (positive integer)
fzf --height=10 --border --border-label="╢ $label ╟" --border-label-pos=3 --color=label:italic:black
# Right-aligned (negative integer) on the bottom line (:bottom)
fzf --height=10 --border --border-label="╢ $label ╟" --border-label-pos=-3:bottom --color=label:italic:black
```
- Also added `--preview-label` and `--preview-label-pos` for the border of the
preview window
```sh
fzf --preview 'cat {}' --border --preview-label=' Preview ' --preview-label-pos=2
```
- Info panel (match counter) will be followed by a horizontal separator by
default
- Use `--no-separator` or `--separator=''` to hide the separator
- You can specify an arbitrary string that is repeated to form the
horizontal separator. e.g. `--separator=╸`
- The color of the separator can be customized via `--color=separator:...`
- ANSI color codes are also supported
```sh
fzf --separator=╸ --color=separator:green
fzf --separator=$(lolcat -f -F 1.4 <<< ▁▁▂▃▄▅▆▆▅▄▃▂▁▁) --info=inline
```
- Added `--border=bold` and `--border=double` along with
`--preview-window=border-bold` and `--preview-window=border-double`
0.34.0
------
- Added support for adaptive `--height`. If the `--height` value is prefixed
with `~`, fzf will automatically determine the height in the range according
to the input size.
```sh
seq 1 | fzf --height ~70% --border --padding 1 --margin 1
seq 10 | fzf --height ~70% --border --padding 1 --margin 1
seq 100 | fzf --height ~70% --border --padding 1 --margin 1
```
- There are a few limitations
- Not compatible with percent top/bottom margin/padding
```sh
# This is not allowed (top/bottom margin in percent value)
fzf --height ~50% --border --margin 5%,10%
# This is allowed (top/bottom margin in fixed value)
fzf --height ~50% --border --margin 2,10%
```
- fzf will not start until it can determine the right height for the input
```sh
# fzf will open immediately
(sleep 2; seq 10) | fzf --height 50%
# fzf will open after 2 seconds
(sleep 2; seq 10) | fzf --height ~50%
(sleep 2; seq 1000) | fzf --height ~50%
```
- Fixed tcell renderer used to render full-screen fzf on Windows
- ~~`--no-clear` is deprecated. Use `reload` action instead.~~
0.33.0
------
- Added `--scheme=[default|path|history]` option to choose scoring scheme
- (Experimental)
- We updated the scoring algorithm in 0.32.0, however we have learned that
this new scheme (`default`) is not always giving the optimal result
- `path`: Additional bonus point is only given to the characters after
path separator. You might want to choose this scheme if you have many
files with spaces in their paths.
- `history`: No additional bonus points are given so that we give more
weight to the chronological ordering. This is equivalent to the scoring
scheme before 0.32.0. This also sets `--tiebreak=index`.
- ANSI color sequences with colon delimiters are now supported.
```sh
printf "\e[38;5;208mOption 1\e[m\nOption 2" | fzf --ansi
printf "\e[38:5:208mOption 1\e[m\nOption 2" | fzf --ansi
```
- Support `border-{up,down}` as the synonyms for `border-{top,bottom}` in
`--preview-window`
- Added support for ANSI `strikethrough`
```sh
printf "\e[9mdeleted" | fzf --ansi
fzf --color fg+:strikethrough
```
0.32.1
------
- Fixed incorrect ordering of `--tiebreak=chunk`
- fzf-tmux will show fzf border instead of tmux popup border (requires tmux 3.3)
```sh
fzf-tmux -p70%
fzf-tmux -p70% --color=border:bright-red
fzf-tmux -p100%,60% --color=border:bright-yellow --border=horizontal --padding 1,5 --margin 1,0
fzf-tmux -p70%,100% --color=border:bright-green --border=vertical
# Key bindings (CTRL-T, CTRL-R, ALT-C) will use these options
export FZF_TMUX_OPTS='-p100%,60% --color=border:green --border=horizontal --padding 1,5 --margin 1,0'
```
0.32.0
------
- Updated the scoring algorithm
- Different bonus points to different categories of word boundaries
(listed higher to lower bonus point)
- Word after whitespace characters or beginning of the string
- Word after common delimiter characters (`/,:;|`)
- Word after other non-word characters
```sh
# foo/bar.sh` is preferred over `foo-bar.sh` on `bar`
fzf --query=bar --height=4 << EOF
foo-bar.sh
foo/bar.sh
EOF
```
- Added a new tiebreak `chunk`
- Favors the line with shorter matched chunk. A chunk is a set of
consecutive non-whitespace characters.
- Unlike the default `length`, this scheme works well with tabular input
```sh
# length prefers item #1, because the whole line is shorter,
# chunk prefers item #2, because the matched chunk ("foo") is shorter
fzf --height=6 --header-lines=2 --tiebreak=chunk --reverse --query=fo << "EOF"
N | Field1 | Field2 | Field3
- | ------ | ------ | ------
1 | hello | foobar | baz
2 | world | foo | bazbaz
EOF
```
- If the input does not contain any spaces, `chunk` is equivalent to
`length`. But we're not going to set it as the default because it is
computationally more expensive.
- Bug fixes and improvements
0.31.0
------
- Added support for an alternative preview window layout that is activated
when the size of the preview window is smaller than a certain threshold.
```sh
# If the width of the preview window is smaller than 50 columns,
# it will be displayed above the search window.
fzf --preview 'cat {}' --preview-window 'right,50%,border-left,<50(up,30%,border-bottom)'
# Or you can just hide it like so
fzf --preview 'cat {}' --preview-window '<50(hidden)'
```
- fzf now uses SGR mouse mode to properly support mouse on larger terminals
- You can now use characters that do not satisfy `unicode.IsGraphic` constraint
for `--marker`, `--pointer`, and `--ellipsis`. Allows Nerd Fonts and stuff.
Use at your own risk.
- Bug fixes and improvements
- Shell extension
- `kill` completion now requires trigger sequence (`**`) for consistency
0.30.0
------
- Fixed cursor flickering over the screen by hiding it during rendering
- Added `--ellipsis` option. You can take advantage of it to make fzf
effectively search non-visible parts of the item.
```sh
# Search against hidden line numbers on the far right
nl /usr/share/dict/words |
awk '{printf "%s%1000s\n", $2, $1}' |
fzf --nth=-1 --no-hscroll --ellipsis='' |
awk '{print $2}'
```
- Added `rebind` action for restoring bindings after `unbind`
- Bug fixes and improvements
0.29.0
------
- Added `change-preview(...)` action to change the `--preview` command
- cf. `preview(...)` is a one-off action that doesn't change the default
preview command
- Added `change-preview-window(...)` action
- You can rotate through the different options separated by `|`
```sh
fzf --preview 'cat {}' --preview-window right:40% \
--bind 'ctrl-/:change-preview-window(right,70%|down,40%,border-top|hidden|)'
```
- Fixed rendering of the prompt line when overflow occurs with `--info=inline`
0.28.0
------
- Added `--header-first` option to print header before the prompt line
```sh
fzf --header $'Welcome to fzf\n▔▔▔▔▔▔▔▔▔▔▔▔▔▔' --reverse --height 30% --border --header-first
```
- Added `--scroll-off=LINES` option (similar to `scrolloff` option of Vim)
- You can set it to a very large number so that the cursor stays in the
middle of the screen while scrolling
```sh
fzf --scroll-off=5
fzf --scroll-off=999
```
- Fixed bug where preview window is not updated on `reload` (#2644)
- fzf on Windows will also use `$SHELL` to execute external programs
- See #2638 and #2647
- Thanks to @rashil2000, @vovcacik, and @janlazo
0.27.3
------
- Preview window is `hidden` by default when there are `preview` bindings but
`--preview` command is not given
- Fixed bug where `{n}` is not properly reset on `reload`
- Fixed bug where spinner is not displayed on `reload`
- Enhancements in tcell renderer for Windows (#2616)
- Vim plugin
- `sinklist` is added as a synonym to `sink*` so that it's easier to add
a function to a spec dictionary
```vim
let spec = { 'source': 'ls', 'options': ['--multi', '--preview', 'cat {}'] }
function spec.sinklist(matches)
echom string(a:matches)
endfunction
call fzf#run(fzf#wrap(spec))
```
- Vim 7 compatibility
0.27.2
------
- 16 base ANSI colors can be specified by their names
```sh
fzf --color fg:3,fg+:11
fzf --color fg:yellow,fg+:bright-yellow
```
- Fix bug where `--read0` not properly displaying long lines
0.27.1
------
- Added `unbind` action. In the following Ripgrep launcher example, you can
use `unbind(reload)` to switch to fzf-only filtering mode.
- See https://github.com/junegunn/fzf/blob/master/ADVANCED.md#switching-to-fzf-only-search-mode
- Vim plugin
- Vim plugin will stop immediately even when the source command hasn't finished
```vim
" fzf will read the stream file while allowing other processes to append to it
call fzf#run({'source': 'cat /dev/null > /tmp/stream; tail -f /tmp/stream'})
```
- It is now possible to open popup window relative to the current window
```vim
let g:fzf_layout = { 'window': { 'width': 0.9, 'height': 0.6, 'relative': v:true, 'yoffset': 1.0 } }
```
0.27.0
------
- More border options for `--preview-window`
```sh
fzf --preview 'cat {}' --preview-window border-left
fzf --preview 'cat {}' --preview-window border-left --border horizontal
fzf --preview 'cat {}' --preview-window top:border-bottom
fzf --preview 'cat {}' --preview-window top:border-horizontal
```
- Automatically set `/dev/tty` as STDIN on execute action
```sh
# Redirect /dev/tty to suppress "Vim: Warning: Input is not from a terminal"
# ls | fzf --bind "enter:execute(vim {} < /dev/tty)"
# "< /dev/tty" part is no longer needed
ls | fzf --bind "enter:execute(vim {})"
```
- Bug fixes and improvements
- Signed and notarized macOS binaries
(Huge thanks to [BACKERS.md](https://github.com/junegunn/junegunn/blob/main/BACKERS.md)!)
0.26.0
------
- Added support for fixed header in preview window
```sh
# Display top 3 lines as the fixed header
fzf --preview 'bat --style=header,grid --color=always {}' --preview-window '~3'
```
- More advanced preview offset expression to better support the fixed header
```sh
# Preview with bat, matching line in the middle of the window below
# the fixed header of the top 3 lines
#
# ~3 Top 3 lines as the fixed header
# +{2} Base scroll offset extracted from the second field
# +3 Extra offset to compensate for the 3-line header
# /2 Put in the middle of the preview area
#
git grep --line-number '' |
fzf --delimiter : \
--preview 'bat --style=full --color=always --highlight-line {2} {1}' \
--preview-window '~3:+{2}+3/2'
```
- Added `select` and `deselect` action for unconditionally selecting or
deselecting a single item in `--multi` mode. Complements `toggle` action.
- Significant performance improvement in ANSI code processing
- Bug fixes and improvements
- Built with Go 1.16
0.25.1
------
- Added `close` action
- Close preview window if open, abort fzf otherwise
- Bug fixes and improvements
0.25.0
------
- Text attributes set in `--color` are not reset when fzf sees another
`--color` option for the same element. This allows you to put custom text
attributes in your `$FZF_DEFAULT_OPTS` and still have those attributes
even when you override the colors.
```sh
# Default colors and attributes
fzf
# Apply custom text attributes
export FZF_DEFAULT_OPTS='--color fg+:italic,hl:-1:underline,hl+:-1:reverse:underline'
fzf
# Different colors but you still have the attributes
fzf --color hl:176,hl+:177
# Write "regular" if you want to clear the attributes
fzf --color hl:176:regular,hl+:177:regular
```
- Renamed `--phony` to `--disabled`
- You can dynamically enable and disable the search functionality using the
new `enable-search`, `disable-search`, and `toggle-search` actions
- You can assign a different color to the query string for when search is disabled
```sh
fzf --color query:#ffffff,disabled:#999999 --bind space:toggle-search
```
- Added `last` action to move the cursor to the last match
- The opposite action `top` is renamed to `first`, but `top` is still
recognized as a synonym for backward compatibility
- Added `preview-top` and `preview-bottom` actions
- Extended support for alt key chords: alt with any case-sensitive single character
```sh
fzf --bind alt-,:first,alt-.:last
```
0.24.4
------
- Added `--preview-window` option `follow`
```sh
# Preview window will automatically scroll to the bottom
fzf --preview-window follow --preview 'for i in $(seq 100000); do
echo "$i"
sleep 0.01
(( i % 300 == 0 )) && printf "\033[2J"
done'
```
- Added `change-prompt` action
```sh
fzf --prompt 'foo> ' --bind $'a:change-prompt:\x1b[31mbar> '
```
- Bug fixes and improvements
0.24.3
------
- Added `--padding` option
```sh
fzf --margin 5% --padding 5% --border --preview 'cat {}' \
--color bg:#222222,preview-bg:#333333
```
0.24.2
------
- Bug fixes and improvements
0.24.1
------
- Fixed broken `--color=[bw|no]` option
0.24.0
------
- Real-time rendering of preview window
```sh
# fzf can render preview window before the command completes
fzf --preview 'sleep 1; for i in $(seq 100); do echo $i; sleep 0.01; done'
# Preview window can process ANSI escape sequence (CSI 2 J) for clearing the display
fzf --preview 'for i in $(seq 100000); do
(( i % 200 == 0 )) && printf "\033[2J"
echo "$i"
sleep 0.01
done'
```
- Updated `--color` option to support text styles
- `regular` / `bold` / `dim` / `underline` / `italic` / `reverse` / `blink`
```sh
# * Set -1 to keep the original color
# * Multiple style attributes can be combined
# * Italic style may not be supported by some terminals
rg --line-number --no-heading --color=always "" |
fzf --ansi --prompt "Rg: " \
--color fg+:italic,hl:underline:-1,hl+:italic:underline:reverse:-1 \
--color pointer:reverse,prompt:reverse,input:159 \
--pointer ' '
```
- More `--border` options
- `vertical`, `top`, `bottom`, `left`, `right`
- Updated Vim plugin to use these new `--border` options
```vim
" Floating popup window in the center of the screen
let g:fzf_layout = { 'window': { 'width': 0.9, 'height': 0.6 } }
" Popup with 100% width
let g:fzf_layout = { 'window': { 'width': 1.0, 'height': 0.5, 'border': 'horizontal' } }
" Popup with 100% height
let g:fzf_layout = { 'window': { 'width': 0.5, 'height': 1.0, 'border': 'vertical' } }
" Similar to 'down' layout, but it uses a popup window and doesn't affect the window layout
let g:fzf_layout = { 'window': { 'width': 1.0, 'height': 0.5, 'yoffset': 1.0, 'border': 'top' } }
" Opens on the right;
" 'highlight' option is still supported but it will only take the foreground color of the group
let g:fzf_layout = { 'window': { 'width': 0.5, 'height': 1.0, 'xoffset': 1.0, 'border': 'left', 'highlight': 'Comment' } }
```
- To indicate if `--multi` mode is enabled, fzf will print the number of
selected items even when no item is selected
```sh
seq 100 | fzf
# 100/100
seq 100 | fzf --multi
# 100/100 (0)
seq 100 | fzf --multi 5
# 100/100 (0/5)
```
- Since 0.24.0, release binaries will be uploaded to https://github.com/junegunn/fzf/releases
0.23.1
------
- Added `--preview-window` options for disabling flags
- `nocycle`
- `nohidden`
- `nowrap`
- `default`
- Built with Go 1.14.9 due to performance regression
- https://github.com/golang/go/issues/40727
0.23.0
------
- Support preview scroll offset relative to window height
```sh
git grep --line-number '' |
fzf --delimiter : \
--preview 'bat --style=numbers --color=always --highlight-line {2} {1}' \
--preview-window +{2}-/2
```
- Added `--preview-window` option for sharp edges (`--preview-window sharp`)
- Added `--preview-window` option for cyclic scrolling (`--preview-window cycle`)
- Reduced vertical padding around the preview window when `--preview-window
noborder` is used
- Added actions for preview window
- `preview-half-page-up`
- `preview-half-page-down`
- Vim
- Popup width and height can be given in absolute integer values
- Added `fzf#exec()` function for getting the path of fzf executable
- It also downloads the latest binary if it's not available by running
`./install --bin`
- Built with Go 1.15.2
- We no longer provide 32-bit binaries
0.22.0
------
- Added more options for `--bind`
- `backward-eof` event
```sh
# Aborts when you delete backward when the query prompt is already empty
fzf --bind backward-eof:abort
```
- `refresh-preview` action
```sh
# Rerun preview command when you hit '?'
fzf --preview 'echo $RANDOM' --bind '?:refresh-preview'
```
- `preview` action
```sh
# Default preview command with an extra preview binding
fzf --preview 'file {}' --bind '?:preview:cat {}'
# A preview binding with no default preview command
# (Preview window is initially empty)
fzf --bind '?:preview:cat {}'
# Preview window hidden by default, it appears when you first hit '?'
fzf --bind '?:preview:cat {}' --preview-window hidden
```
- Added preview window option for setting the initial scroll offset
```sh
# Initial scroll offset is set to the line number of each line of
# git grep output *minus* 5 lines
git grep --line-number '' |
fzf --delimiter : --preview 'nl {1}' --preview-window +{2}-5
```
- Added support for ANSI colors in `--prompt` string
- Smart match of accented characters
- An unaccented character in the query string will match both accented and
unaccented characters, while an accented character will only match
accented characters. This is similar to how "smart-case" match works.
- Vim plugin
- `tmux` layout option for using fzf-tmux
```vim
let g:fzf_layout = { 'tmux': '-p90%,60%' }
```
0.21.1
------
- Shell extension
- CTRL-R will remove duplicate commands
- fzf-tmux
- Supports tmux popup window (require tmux 3.2 or above)
- ```sh
# 50% width and height
fzf-tmux -p
# 80% width and height
fzf-tmux -p 80%
# 80% width and 40% height
fzf-tmux -p 80%,40%
fzf-tmux -w 80% -h 40%
# Window position
fzf-tmux -w 80% -h 40% -x 0 -y 0
fzf-tmux -w 80% -h 40% -y 1000
# Write ordinary fzf options after --
fzf-tmux -p -- --reverse --info=inline --margin 2,4 --border
```
- On macOS, you can build the latest tmux from the source with
`brew install tmux --HEAD`
- Bug fixes
- Fixed Windows file traversal not to include directories
- Fixed ANSI colors with `--keep-right`
- Fixed _fzf_complete for zsh
- Built with Go 1.14.1
0.21.0
------
- `--height` option is now available on Windows as well (@kelleyma49)
- Added `--pointer` and `--marker` options
- Added `--keep-right` option that keeps the right end of the line visible
when it's too long
- Style changes
- `--border` will now print border with rounded corners around the
finder instead of printing horizontal lines above and below it.
The previous style is available via `--border=horizontal`
- Unicode spinner
- More keys and actions for `--bind`
- Added PowerShell script for downloading Windows binary
- Vim plugin: Built-in floating windows support
```vim
let g:fzf_layout = { 'window': { 'width': 0.9, 'height': 0.6 } }
```
- bash: Various improvements in key bindings (CTRL-T, CTRL-R, ALT-C)
- CTRL-R will start with the current command-line as the initial query
- CTRL-R properly supports multi-line commands
- Fuzzy completion API changed
```sh
# Previous: fzf arguments given as a single string argument
# - This style is still supported, but it's deprecated
_fzf_complete "--multi --reverse --prompt=\"doge> \"" "$@" < <(
echo foo
)
# New API: multiple fzf arguments before "--"
# - Easier to write multiple options
_fzf_complete --multi --reverse --prompt="doge> " -- "$@" < <(
echo foo
)
```
- Bug fixes and improvements
0.20.0
------
- Customizable preview window color (`preview-fg` and `preview-bg` for `--color`)
```sh
fzf --preview 'cat {}' \
--color 'fg:#bbccdd,fg+:#ddeeff,bg:#334455,preview-bg:#223344,border:#778899' \
--border --height 20 --layout reverse --info inline
```
- Removed the immediate flicking of the screen on `reload` action.
```sh
: | fzf --bind 'change:reload:seq {q}' --phony
```
- Added `clear-query` and `clear-selection` actions for `--bind`
- It is now possible to split a composite bind action over multiple `--bind`
expressions by prefixing the later ones with `+`.
```sh
fzf --bind 'ctrl-a:up+up'
# Can be now written as
fzf --bind 'ctrl-a:up' --bind 'ctrl-a:+up'
# This is useful when you need to write special execute/reload form (i.e. `execute:...`)
# to avoid parse errors and add more actions to the same key
fzf --multi --bind 'ctrl-l:select-all+execute:less {+f}' --bind 'ctrl-l:+deselect-all'
```
- Fixed parse error of `--bind` expression where concatenated execute/reload
action contains `+` character.
```sh
fzf --multi --bind 'ctrl-l:select-all+execute(less {+f})+deselect-all'
```
- Fixed bugs of reload action
- Not triggered when there's no match even when the command doesn't have
any placeholder expressions
- Screen not properly cleared when `--header-lines` not filled on reload
0.19.0
------
- Added `--phony` option which completely disables search functionality.
Useful when you want to use fzf only as a selector interface. See below.
- Added "reload" action for dynamically updating the input list without
restarting fzf. See https://github.com/junegunn/fzf/issues/1750 to learn
more about it.
```sh
# Using fzf as the selector interface for ripgrep
RG_PREFIX="rg --column --line-number --no-heading --color=always --smart-case "
INITIAL_QUERY="foo"
FZF_DEFAULT_COMMAND="$RG_PREFIX '$INITIAL_QUERY' || true" \
fzf --bind "change:reload:$RG_PREFIX {q} || true" \
--ansi --phony --query "$INITIAL_QUERY"
```
- `--multi` now takes an optional integer argument which indicates the maximum
number of items that can be selected
```sh
seq 100 | fzf --multi 3 --reverse --height 50%
```
- If a placeholder expression for `--preview` and `execute` action (and the
new `reload` action) contains `f` flag, it is replaced to the
path of a temporary file that holds the evaluated list. This is useful
when you multi-select a large number of items and the length of the
evaluated string may exceed [`ARG_MAX`][argmax].
```sh
# Press CTRL-A to select 100K items and see the sum of all the numbers
seq 100000 | fzf --multi --bind ctrl-a:select-all \
--preview "awk '{sum+=\$1} END {print sum}' {+f}"
```
- `deselect-all` no longer deselects unmatched items. It is now consistent
with `select-all` and `toggle-all` in that it only affects matched items.
- Due to the limitation of bash, fuzzy completion is enabled by default for
a fixed set of commands. A helper function for easily setting up fuzzy
completion for any command is now provided.
```sh
# usage: _fzf_setup_completion path|dir COMMANDS...
_fzf_setup_completion path git kubectl
```
- Info line style can be changed by `--info=STYLE`
- `--info=default`
- `--info=inline` (same as old `--inline-info`)
- `--info=hidden`
- Preview window border can be disabled by adding `noborder` to
`--preview-window`.
- When you transform the input with `--with-nth`, the trailing white spaces
are removed.
- `ctrl-\`, `ctrl-]`, `ctrl-^`, and `ctrl-/` can now be used with `--bind`
- See https://github.com/junegunn/fzf/milestone/15?closed=1 for more details
[argmax]: https://unix.stackexchange.com/questions/120642/what-defines-the-maximum-size-for-a-command-single-argument
0.18.0
------
- Added placeholder expression for zero-based item index: `{n}` and `{+n}`
- `fzf --preview 'echo {n}: {}'`
- Added color option for the gutter: `--color gutter:-1`
- Added `--no-unicode` option for drawing borders in non-Unicode, ASCII
characters
- `FZF_PREVIEW_LINES` and `FZF_PREVIEW_COLUMNS` are exported to preview process
- fzf still overrides `LINES` and `COLUMNS` as before, but they may be
reset by the default shell.
- Bug fixes and improvements
- See https://github.com/junegunn/fzf/milestone/14?closed=1
- Built with Go 1.12.1
0.17.5
------
- Bug fixes and improvements
- See https://github.com/junegunn/fzf/milestone/13?closed=1
- Search query longer than the screen width is allowed (up to 300 chars)
- Built with Go 1.11.1
0.17.4
------
- Added `--layout` option with a new layout called `reverse-list`.
- `--layout=reverse` is a synonym for `--reverse`
- `--layout=default` is a synonym for `--no-reverse`
- Preview window will be updated even when there is no match for the query
if any of the placeholder expressions (e.g. `{q}`, `{+}`) evaluates to
a non-empty string.
- More keys for binding: `shift-{up,down}`, `alt-{up,down,left,right}`
- fzf can now start even when `/dev/tty` is not available by making an
educated guess.
- Updated the default command for Windows.
- Fixes and improvements on bash/zsh completion
- install and uninstall scripts now supports generating files under
`XDG_CONFIG_HOME` on `--xdg` flag.
See https://github.com/junegunn/fzf/milestone/12?closed=1 for the full list of
changes.
0.17.3
------
- `$LINES` and `$COLUMNS` are exported to preview command so that the command
knows the exact size of the preview window.
- Better error messages when the default command or `$FZF_DEFAULT_COMMAND`
fails.
- Reverted #1061 to avoid having duplicate entries in the list when find
command detected a file system loop (#1120). The default command now
requires that find supports `-fstype` option.
- fzf now distinguishes mouse left click and right click (#1130)
- Right click is now bound to `toggle` action by default
- `--bind` understands `left-click` and `right-click`
- Added `replace-query` action (#1137)
- Replaces query string with the current selection
- Added `accept-non-empty` action (#1162)
- Same as accept, except that it prevents fzf from exiting without any
selection
0.17.1
------
- Fixed custom background color of preview window (#1046)
- Fixed background color issues of Windows binary
- Fixed Windows binary to execute command using cmd.exe with no parsing and
escaping (#1072)
- Added support for `window` layout on Vim 8 using Vim 8 terminal (#1055)
0.17.0-2
--------
A maintenance release for auxiliary scripts. fzf binaries are not updated.
- Experimental support for the builtin terminal of Vim 8
- fzf can now run inside GVim
- Updated Vim plugin to better handle `&shell` issue on fish
- Fixed a bug of fzf-tmux where invalid output is generated
- Fixed fzf-tmux to work even when `tput` does not work
0.17.0
------
- Performance optimization
- One can match literal spaces in extended-search mode with a space prepended
by a backslash.
- `--expect` is now additive and can be specified multiple times.
0.16.11
-------
- Performance optimization
- Fixed missing preview update
0.16.10
-------
- Fixed invalid handling of ANSI colors in preview window
- Further improved `--ansi` performance
0.16.9
------
- Memory and performance optimization
- Around 20% performance improvement for general use cases
- Up to 5x faster processing of `--ansi`
- Up to 50% reduction of memory usage
- Bug fixes and usability improvements
- Fixed handling of bracketed paste mode
- [ERROR] on info line when the default command failed
- More efficient rendering of preview window
- `--no-clear` updated for repetitive relaunching scenarios
0.16.8
------
- New `change` event and `top` action for `--bind`
- `fzf --bind change:top`
- Move cursor to the top result whenever the query string is changed
- `fzf --bind 'ctrl-w:unix-word-rubout+top,ctrl-u:unix-line-discard+top'`
- `top` combined with `unix-word-rubout` and `unix-line-discard`
- Fixed inconsistent tiebreak scores when `--nth` is used
- Proper display of tab characters in `--prompt`
- Fixed not to `--cycle` on page-up/page-down to prevent overshoot
- Git revision in `--version` output
- Basic support for Cygwin environment
- Many fixes in Vim plugin on Windows/Cygwin (thanks to @janlazo)
0.16.7
------
- Added support for `ctrl-alt-[a-z]` key chords
- CTRL-Z (SIGSTOP) now works with fzf
- fzf will export `$FZF_PREVIEW_WINDOW` so that the scripts can use it
- Bug fixes and improvements in Vim plugin and shell extensions
0.16.6
------
- Minor bug fixes and improvements
- Added `--no-clear` option for scripting purposes
0.16.5
------
- Minor bug fixes
- Added `toggle-preview-wrap` action
- Built with Go 1.8
0.16.4
------
- Added `--border` option to draw border above and below the finder
- Bug fixes and improvements
0.16.3
------
- Fixed a bug where fzf incorrectly display the lines when straddling tab
characters are trimmed
- Placeholder expression used in `--preview` and `execute` action can
optionally take `+` flag to be used with multiple selections
- e.g. `git log --oneline | fzf --multi --preview 'git show {+1}'`
- Added `execute-silent` action for executing a command silently without
switching to the alternate screen. This is useful when the process is
short-lived and you're not interested in its output.
- e.g. `fzf --bind 'ctrl-y:execute!(echo -n {} | pbcopy)'`
- `ctrl-space` is allowed in `--bind`
0.16.2
------
- Dropped ncurses dependency
- Binaries for freebsd, openbsd, arm5, arm6, arm7, and arm8
- Official 24-bit color support
- Added support for composite actions in `--bind`. Multiple actions can be
chained using `+` separator.
- e.g. `fzf --bind 'ctrl-y:execute(echo -n {} | pbcopy)+abort'`
- `--preview-window` with size 0 is allowed. This is used to make fzf execute
preview command in the background without displaying the result.
- Minor bug fixes and improvements
0.16.1
------
- Fixed `--height` option to properly fill the window with the background
color
- Added `half-page-up` and `half-page-down` actions
- Added `-L` flag to the default find command
0.16.0
------
- *Added `--height HEIGHT[%]` option*
- fzf can now display finder without occupying the full screen
- Preview window will truncate long lines by default. Line wrap can be enabled
by `:wrap` flag in `--preview-window`.
- Latin script letters will be normalized before matching so that it's easier
to match against accented letters. e.g. `sodanco` can match `Só Danço Samba`.
- Normalization can be disabled via `--literal`
- Added `--filepath-word` to make word-wise movements/actions (`alt-b`,
`alt-f`, `alt-bs`, `alt-d`) respect path separators
0.15.9
------
- Fixed rendering glitches introduced in 0.15.8
- The default escape delay is reduced to 50ms and is configurable via
`$ESCDELAY`
- Scroll indicator at the top-right corner of the preview window is always
displayed when there's overflow
- Can now be built with ncurses 6 or tcell to support extra features
- *ncurses 6*
- Supports more than 256 color pairs
- Supports italics
- *tcell*
- 24-bit color support
- See https://github.com/junegunn/fzf/blob/master/BUILD.md
0.15.8
------
- Updated ANSI processor to handle more VT-100 escape sequences
- Added `--no-bold` (and `--bold`) option
- Improved escape sequence processing for WSL
- Added support for `alt-[0-9]`, `f11`, and `f12` for `--bind` and `--expect`
0.15.7
------
- Fixed panic when color is disabled and header lines contain ANSI colors
0.15.6
------
- Windows binaries! (@kelleyma49)
- Fixed the bug where header lines are cleared when preview window is toggled
- Fixed not to display ^N and ^O on screen
- Fixed cursor keys (or any key sequence that starts with ESC) on WSL by
making fzf wait for additional keystrokes after ESC for up to 100ms
0.15.5
------
- Setting foreground color will no longer set background color to black
- e.g. `fzf --color fg:153`
- `--tiebreak=end` will consider relative position instead of absolute distance
- Updated `fzf#wrap` function to respect `g:fzf_colors`
0.15.4
------
- Added support for range expression in preview and execute action
- e.g. `ls -l | fzf --preview="echo user={3} when={-4..-2}; cat {-1}" --header-lines=1`
- `{q}` will be replaced to the single-quoted string of the current query
- Fixed to properly handle unicode whitespace characters
- Display scroll indicator in preview window
- Inverse search term will use exact matcher by default
- This is a breaking change, but I believe it makes much more sense. It is
almost impossible to predict which entries will be filtered out due to
a fuzzy inverse term. You can still perform inverse-fuzzy-match by
prepending `!'` to the term.
0.15.3
------
- Added support for more ANSI attributes: dim, underline, blink, and reverse
- Fixed race condition in `toggle-preview`
0.15.2
------
- Preview window is now scrollable
- With mouse scroll or with bindable actions
- `preview-up`
- `preview-down`
- `preview-page-up`
- `preview-page-down`
- Updated ANSI processor to support high intensity colors and ignore
some VT100-related escape sequences
0.15.1
------
- Fixed panic when the pattern occurs after 2^15-th column
- Fixed rendering delay when displaying extremely long lines
0.15.0
------
- Improved fuzzy search algorithm
- Added `--algo=[v1|v2]` option so one can still choose the old algorithm
which values the search performance over the quality of the result
- Advanced scoring criteria
- `--read0` to read input delimited by ASCII NUL character
- `--print0` to print output delimited by ASCII NUL character
0.13.5
------
- Memory and performance optimization
- Up to 2x performance with half the amount of memory
0.13.4
------
- Performance optimization
- Memory footprint for ascii string is reduced by 60%
- 15 to 20% improvement of query performance
- Up to 45% better performance of `--nth` with non-regex delimiters
- Fixed invalid handling of `hidden` property of `--preview-window`
0.13.3
------
- Fixed duplicate rendering of the last line in preview window
0.13.2
------
- Fixed race condition where preview window is not properly cleared
0.13.1
------
- Fixed UI issue with large `--preview` output with many ANSI codes
0.13.0
------
- Added preview feature
- `--preview CMD`
- `--preview-window POS[:SIZE][:hidden]`
- `{}` in execute action is now replaced to the single-quoted (instead of
double-quoted) string of the current line
- Fixed to ignore control characters for bracketed paste mode
0.12.2
------
- 256-color capability detection does not require `256` in `$TERM`
- Added `print-query` action
- More named keys for binding; <kbd>F1</kbd> ~ <kbd>F10</kbd>,
<kbd>ALT-/</kbd>, <kbd>ALT-space</kbd>, and <kbd>ALT-enter</kbd>
- Added `jump` and `jump-accept` actions that implement [EasyMotion][em]-like
movement
![][jump]
[em]: https://github.com/easymotion/vim-easymotion
[jump]: https://cloud.githubusercontent.com/assets/700826/15367574/b3999dc4-1d64-11e6-85da-28ceeb1a9bc2.png
0.12.1
------
- Ranking algorithm introduced in 0.12.0 is now universally applied
- Fixed invalid cache reference in exact mode
- Fixes and improvements in Vim plugin and shell extensions
0.12.0
------
- Enhanced ranking algorithm
- Minor bug fixes
0.11.4
------
- Added `--hscroll-off=COL` option (default: 10) (#513)
- Some fixes in Vim plugin and shell extensions
0.11.3
------
- Graceful exit on SIGTERM (#482)
- `$SHELL` instead of `sh` for `execute` action and `$FZF_DEFAULT_COMMAND` (#481)
- Changes in fuzzy completion API
- [`_fzf_compgen_{path,dir}`](https://github.com/junegunn/fzf/commit/9617647)
- [`_fzf_complete_COMMAND_post`](https://github.com/junegunn/fzf/commit/8206746)
for post-processing
0.11.2
------
- `--tiebreak` now accepts comma-separated list of sort criteria
- Each criterion should appear only once in the list
- `index` is only allowed at the end of the list
- `index` is implicitly appended to the list when not specified
- Default is `length` (or equivalently `length,index`)
- `begin` criterion will ignore leading whitespaces when calculating the index
- Added `toggle-in` and `toggle-out` actions
- Switch direction depending on `--reverse`-ness
- `export FZF_DEFAULT_OPTS="--bind tab:toggle-out,shift-tab:toggle-in"`
- Reduced the initial delay when `--tac` is not given
- fzf defers the initial rendering of the screen up to 100ms if the input
stream is ongoing to prevent unnecessary redraw during the initial
phase. However, 100ms delay is quite noticeable and might give the
impression that fzf is not snappy enough. This commit reduces the
maximum delay down to 20ms when `--tac` is not specified, in which case
the input list quickly fills the entire screen.
0.11.1
------
- Added `--tabstop=SPACES` option
0.11.0
------
- Added OR operator for extended-search mode
- Added `--execute-multi` action
- Fixed incorrect cursor position when unicode wide characters are used in
`--prompt`
- Fixes and improvements in shell extensions
0.10.9
------
- Extended-search mode is now enabled by default
- `--extended-exact` is deprecated and instead we have `--exact` for
orthogonally controlling "exactness" of search
- Fixed not to display non-printable characters
- Added `double-click` for `--bind` option
- More robust handling of SIGWINCH
0.10.8
------
- Fixed panic when trying to set colors after colors are disabled (#370)
0.10.7
------
- Fixed unserialized interrupt handling during execute action which often
caused invalid memory access and crash
- Changed `--tiebreak=length` (default) to use trimmed length when `--nth` is
used
0.10.6
------
- Replaced `--header-file` with `--header` option
- `--header` and `--header-lines` can be used together
- Changed exit status
- 0: Okay
- 1: No match
- 2: Error
- 130: Interrupted
- 64-bit linux binary is statically-linked with ncurses to avoid
compatibility issues.
0.10.5
------
- `'`-prefix to unquote the term in `--extended-exact` mode
- Backward scan when `--tiebreak=end` is set
0.10.4
------
- Fixed to remove ANSI code from output when `--with-nth` is set
0.10.3
------
- Fixed slow performance of `--with-nth` when used with `--delimiter`
- Regular expression engine of Golang as of now is very slow, so the fixed
version will treat the given delimiter pattern as a plain string instead
of a regular expression unless it contains special characters and is
a valid regular expression.
- Simpler regular expression for delimiter for better performance
0.10.2
------
### Fixes and improvements
- Improvement in perceived response time of queries
- Eager, efficient rune array conversion
- Graceful exit when failed to initialize ncurses (invalid $TERM)
- Improved ranking algorithm when `--nth` option is set
- Changed the default command not to fail when there are files whose names
start with dash
0.10.1
------
### New features
- Added `--margin` option
- Added options for sticky header
- `--header-file`
- `--header-lines`
- Added `cancel` action which clears the input or closes the finder when the
input is already empty
- e.g. `export FZF_DEFAULT_OPTS="--bind esc:cancel"`
- Added `delete-char/eof` action to differentiate `CTRL-D` and `DEL`
### Minor improvements/fixes
- Fixed to allow binding colon and comma keys
- Fixed ANSI processor to handle color regions spanning multiple lines
0.10.0
------
### New features
- More actions for `--bind`
- `select-all`
- `deselect-all`
- `toggle-all`
- `ignore`
- `execute(...)` action for running arbitrary command without leaving fzf
- `fzf --bind "ctrl-m:execute(less {})"`
- `fzf --bind "ctrl-t:execute(tmux new-window -d 'vim {}')"`
- If the command contains parentheses, use any of the follows alternative
notations to avoid parse errors
- `execute[...]`
- `execute~...~`
- `execute!...!`
- `execute@...@`
- `execute#...#`
- `execute$...$`
- `execute%...%`
- `execute^...^`
- `execute&...&`
- `execute*...*`
- `execute;...;`
- `execute/.../`
- `execute|...|`
- `execute:...`
- This is the special form that frees you from parse errors as it
does not expect the closing character
- The catch is that it should be the last one in the
comma-separated list
- Added support for optional search history
- `--history HISTORY_FILE`
- When used, `CTRL-N` and `CTRL-P` are automatically remapped to
`next-history` and `previous-history`
- `--history-size MAX_ENTRIES` (default: 1000)
- Cyclic scrolling can be enabled with `--cycle`
- Fixed the bug where the spinner was not spinning on idle input stream
- e.g. `sleep 100 | fzf`
### Minor improvements/fixes
- Added synonyms for key names that can be specified for `--bind`,
`--toggle-sort`, and `--expect`
- Fixed the color of multi-select marker on the current line
- Fixed to allow `^pattern$` in extended-search mode
0.9.13
------
### New features
- Color customization with the extended `--color` option
### Bug fixes
- Fixed premature termination of Reader in the presence of a long line which
is longer than 64KB
0.9.12
------
### New features
- Added `--bind` option for custom key bindings
### Bug fixes
- Fixed to update "inline-info" immediately after terminal resize
- Fixed ANSI code offset calculation
0.9.11
------
### New features
- Added `--inline-info` option for saving screen estate (#202)
- Useful inside Neovim
- e.g. `let $FZF_DEFAULT_OPTS = $FZF_DEFAULT_OPTS.' --inline-info'`
### Bug fixes
- Invalid mutation of input on case conversion (#209)
- Smart-case for each term in extended-search mode (#208)
- Fixed double-click result when scroll offset is positive
0.9.10
------
### Improvements
- Performance optimization
- Less aggressive memoization to limit memory usage
### New features
- Added color scheme for light background: `--color=light`
0.9.9
-----
### New features
- Added `--tiebreak` option (#191)
- Added `--no-hscroll` option (#193)
- Visual indication of `--toggle-sort` (#194)
0.9.8
-----
### Bug fixes
- Fixed Unicode case handling (#186)
- Fixed to terminate on RuneError (#185)
0.9.7
-----
### New features
- Added `--toggle-sort` option (#173)
- `--toggle-sort=ctrl-r` is applied to `CTRL-R` shell extension
### Bug fixes
- Fixed to print empty line if `--expect` is set and fzf is completed by
`--select-1` or `--exit-0` (#172)
- Fixed to allow comma character as an argument to `--expect` option
0.9.6
-----
### New features
#### Added `--expect` option (#163)
If you provide a comma-separated list of keys with `--expect` option, fzf will
allow you to select the match and complete the finder when any of the keys is
pressed. Additionally, fzf will print the name of the key pressed as the first
line of the output so that your script can decide what to do next based on the
information.
```sh
fzf --expect=ctrl-v,ctrl-t,alt-s,f1,f2,~,@
```
The updated vim plugin uses this option to implement
[ctrlp](https://github.com/kien/ctrlp.vim)-compatible key bindings.
### Bug fixes
- Fixed to ignore ANSI escape code `\e[K` (#162)
0.9.5
-----
### New features
#### Added `--ansi` option (#150)
If you give `--ansi` option to fzf, fzf will interpret ANSI color codes from
the input, display the item with the ANSI colors (true colors are not
supported), and strips the codes from the output. This option is off by
default as it entails some overhead.
### Improvements
#### Reduced initial memory footprint (#151)
By removing unnecessary copy of pointers, fzf will use significantly smaller
amount of memory when it's started. The difference is hugely noticeable when
the input is extremely large. (e.g. `locate / | fzf`)
### Bug fixes
- Fixed panic on `--no-sort --filter ''` (#149)
0.9.4
-----
### New features
#### Added `--tac` option to reverse the order of the input.
One might argue that this option is unnecessary since we can already put `tac`
or `tail -r` in the command pipeline to achieve the same result. However, the
advantage of `--tac` is that it does not block until the input is complete.
### *Backward incompatible changes*
#### Changed behavior on `--no-sort`
`--no-sort` option will no longer reverse the display order within finder. You
may want to use the new `--tac` option with `--no-sort`.
```
history | fzf +s --tac
```
### Improvements
#### `--filter` will not block when sort is disabled
When fzf works in filtering mode (`--filter`) and sort is disabled
(`--no-sort`), there's no need to block until input is complete. The new
version of fzf will print the matches on-the-fly when the following condition
is met:
--filter TERM --no-sort [--no-tac --no-sync]
or simply:
-f TERM +s
This change removes unnecessary delay in the use cases like the following:
fzf -f xxx +s | head -5
However, in this case, fzf processes the lines sequentially, so it cannot
utilize multiple cores, and fzf will run slightly slower than the previous
mode of execution where filtering is done in parallel after the entire input
is loaded. If the user is concerned about this performance problem, one can
add `--sync` option to re-enable buffering.
0.9.3
-----
### New features
- Added `--sync` option for multi-staged filtering
### Improvements
- `--select-1` and `--exit-0` will start finder immediately when the condition
cannot be met
================================================
FILE: Dockerfile
================================================
FROM rubylang/ruby:3.4.1-noble
RUN apt-get update -y && apt install -y git make golang zsh fish tmux
RUN gem install --no-document -v 5.22.3 minitest
RUN echo '. /usr/share/bash-completion/completions/git' >> ~/.bashrc
RUN echo '. ~/.bashrc' >> ~/.bash_profile
# Do not set default PS1
RUN rm -f /etc/bash.bashrc
COPY . /fzf
RUN cd /fzf && make install && ./install --all
ENV LANG=C.UTF-8
CMD ["bash", "-ic", "tmux new 'set -o pipefail; ruby /fzf/test/runner.rb | tee out && touch ok' && cat out && [ -e ok ]"]
================================================
FILE: Gemfile
================================================
# frozen_string_literal: true
source 'https://rubygems.org'
gem 'minitest', '5.25.4'
gem 'rubocop', '1.71.0'
gem 'rubocop-minitest', '0.36.0'
gem 'rubocop-performance', '1.23.1'
================================================
FILE: LICENSE
================================================
The MIT License (MIT)
Copyright (c) 2013-2026 Junegunn Choi
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
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
THE SOFTWARE.
================================================
FILE: Makefile
================================================
GO ?= go
DOCKER ?= docker
GOOS ?= $(shell $(GO) env GOOS)
MAKEFILE := $(realpath $(lastword $(MAKEFILE_LIST)))
ROOT_DIR := $(shell dirname $(MAKEFILE))
SOURCES := $(wildcard *.go src/*.go src/*/*.go shell/*sh man/man1/*.1) $(MAKEFILE)
BASH_SCRIPTS := $(ROOT_DIR)/bin/fzf-preview.sh \
$(ROOT_DIR)/bin/fzf-tmux \
$(ROOT_DIR)/install \
$(ROOT_DIR)/uninstall \
$(ROOT_DIR)/shell/common.sh \
$(ROOT_DIR)/shell/update.sh \
$(ROOT_DIR)/shell/completion.bash \
$(ROOT_DIR)/shell/key-bindings.bash
ifdef FZF_VERSION
VERSION := $(FZF_VERSION)
else
VERSION := $(shell git describe --abbrev=0 2> /dev/null | sed "s/^v//")
endif
ifeq ($(VERSION),)
$(error Not on git repository; cannot determine $$FZF_VERSION)
endif
VERSION_TRIM := $(shell echo $(VERSION) | sed "s/^v//; s/-.*//")
VERSION_REGEX := $(subst .,\.,$(VERSION_TRIM))
ifdef FZF_REVISION
REVISION := $(FZF_REVISION)
else
REVISION := $(shell git log -n 1 --pretty=format:%h --abbrev=8 -- $(SOURCES) 2> /dev/null)
endif
ifeq ($(REVISION),)
$(error Not on git repository; cannot determine $$FZF_REVISION)
endif
BUILD_FLAGS := -a -ldflags "-s -w -X main.version=$(VERSION) -X main.revision=$(REVISION)" -tags "$(TAGS)" -trimpath
BINARY32 := fzf-$(GOOS)_386
BINARY64 := fzf-$(GOOS)_amd64
BINARYS390 := fzf-$(GOOS)_s390x
BINARYARM5 := fzf-$(GOOS)_arm5
BINARYARM6 := fzf-$(GOOS)_arm6
BINARYARM7 := fzf-$(GOOS)_arm7
BINARYARM8 := fzf-$(GOOS)_arm8
BINARYPPC64LE := fzf-$(GOOS)_ppc64le
BINARYRISCV64 := fzf-$(GOOS)_riscv64
BINARYLOONG64 := fzf-$(GOOS)_loong64
# https://en.wikipedia.org/wiki/Uname
UNAME_M := $(shell uname -m)
ifeq ($(UNAME_M),x86_64)
BINARY := $(BINARY64)
else ifeq ($(UNAME_M),amd64)
BINARY := $(BINARY64)
else ifeq ($(UNAME_M),s390x)
BINARY := $(BINARYS390)
else ifeq ($(UNAME_M),i686)
BINARY := $(BINARY32)
else ifeq ($(UNAME_M),i386)
BINARY := $(BINARY32)
else ifeq ($(UNAME_M),armv5l)
BINARY := $(BINARYARM5)
else ifeq ($(UNAME_M),armv6l)
BINARY := $(BINARYARM6)
else ifeq ($(UNAME_M),armv7l)
BINARY := $(BINARYARM7)
else ifeq ($(UNAME_M),armv8l)
# armv8l is always 32-bit and should implement the armv7 ISA, so
# just use the same filename as for armv7.
BINARY := $(BINARYARM7)
else ifeq ($(UNAME_M),arm64)
BINARY := $(BINARYARM8)
else ifeq ($(UNAME_M),aarch64)
BINARY := $(BINARYARM8)
else ifeq ($(UNAME_M),ppc64le)
BINARY := $(BINARYPPC64LE)
else ifeq ($(UNAME_M),riscv64)
BINARY := $(BINARYRISCV64)
else ifeq ($(UNAME_M),loongarch64)
BINARY := $(BINARYLOONG64)
else
$(error Build on $(UNAME_M) is not supported, yet.)
endif
all: target/$(BINARY)
test: $(SOURCES)
SHELL=/bin/sh GOOS= $(GO) test -v -tags "$(TAGS)" \
github.com/junegunn/fzf/src \
github.com/junegunn/fzf/src/algo \
github.com/junegunn/fzf/src/tui \
github.com/junegunn/fzf/src/util
itest:
ruby test/runner.rb
bench:
cd src && SHELL=/bin/sh GOOS= $(GO) test -v -tags "$(TAGS)" -run=Bench -bench=. -benchmem
lint: $(SOURCES) test/*.rb test/lib/*.rb ${BASH_SCRIPTS}
[ -z "$$(gofmt -s -d src)" ] || (gofmt -s -d src; exit 1)
bundle exec rubocop -a --require rubocop-minitest --require rubocop-performance
shell/update.sh --check ${BASH_SCRIPTS}
fmt: $(SOURCES) $(BASH_SCRIPTS)
gofmt -s -w src
shell/update.sh ${BASH_SCRIPTS}
install: bin/fzf
generate:
PATH=$(PATH):$(GOPATH)/bin $(GO) generate ./...
build:
goreleaser build --clean --snapshot --skip=post-hooks
release:
# Make sure that the tests pass and the build works
TAGS=tcell make test
make test build clean
ifndef GITHUB_TOKEN
$(error GITHUB_TOKEN is not defined)
endif
# Check if we are on master branch
ifneq ($(shell git symbolic-ref --short HEAD),master)
$(error Not on master branch)
endif
# 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
# Make release note out of CHANGELOG.md
mkdir -p tmp
sed -n '/^$(VERSION_REGEX)$$/,/^[0-9]/p' CHANGELOG.md | tail -r | \
sed '1,/^ *$$/d' | tail -r | sed 1,2d | tee tmp/release-note
# Push to temp branch first so that install scripts always works on master branch
git checkout -B temp master
git push origin temp --follow-tags --force
# Make a GitHub release
goreleaser --clean --release-notes tmp/release-note
# Push to master
git checkout master
git push origin master
# Delete temp branch
git push origin --delete temp
clean:
$(RM) -r dist target
target/$(BINARY32): $(SOURCES)
GOARCH=386 $(GO) build $(BUILD_FLAGS) -o $@
target/$(BINARY64): $(SOURCES)
GOARCH=amd64 $(GO) build $(BUILD_FLAGS) -o $@
target/$(BINARYS390): $(SOURCES)
GOARCH=s390x $(GO) build $(BUILD_FLAGS) -o $@
# https://github.com/golang/go/wiki/GoArm
target/$(BINARYARM5): $(SOURCES)
GOARCH=arm GOARM=5 $(GO) build $(BUILD_FLAGS) -o $@
target/$(BINARYARM6): $(SOURCES)
GOARCH=arm GOARM=6 $(GO) build $(BUILD_FLAGS) -o $@
target/$(BINARYARM7): $(SOURCES)
GOARCH=arm GOARM=7 $(GO) build $(BUILD_FLAGS) -o $@
target/$(BINARYARM8): $(SOURCES)
GOARCH=arm64 $(GO) build $(BUILD_FLAGS) -o $@
target/$(BINARYPPC64LE): $(SOURCES)
GOARCH=ppc64le $(GO) build $(BUILD_FLAGS) -o $@
target/$(BINARYRISCV64): $(SOURCES)
GOARCH=riscv64 $(GO) build $(BUILD_FLAGS) -o $@
target/$(BINARYLOONG64): $(SOURCES)
GOARCH=loong64 $(GO) build $(BUILD_FLAGS) -o $@
bin/fzf: target/$(BINARY) | bin
-rm -f bin/fzf
cp -f target/$(BINARY) bin/fzf
docker:
$(DOCKER) build -t fzf-ubuntu .
$(DOCKER) run -it fzf-ubuntu tmux
docker-test:
$(DOCKER) build -t fzf-ubuntu .
$(DOCKER) run -it fzf-ubuntu
update:
$(GO) get -u
$(GO) mod tidy
.PHONY: all generate build release test itest bench lint install clean docker docker-test update fmt
================================================
FILE: README-VIM.md
================================================
FZF Vim integration
===================
Installation
------------
Once you have fzf installed, you can enable it inside Vim simply by adding the
directory to `&runtimepath` in your Vim configuration file. The path may
differ depending on the package manager.
```vim
" If installed using Homebrew
set rtp+=/usr/local/opt/fzf
" If installed using Homebrew on Apple Silicon
set rtp+=/opt/homebrew/opt/fzf
" If you have cloned fzf on ~/.fzf directory
set rtp+=~/.fzf
```
If you use [vim-plug](https://github.com/junegunn/vim-plug), the same can be
written as:
```vim
" If installed using Homebrew
Plug '/usr/local/opt/fzf'
" If installed using Homebrew on Apple Silicon
Plug '/opt/homebrew/opt/fzf'
" If you have cloned fzf on ~/.fzf directory
Plug '~/.fzf'
```
But if you want the latest Vim plugin file from GitHub rather than the one
included in the package, write:
```vim
Plug 'junegunn/fzf'
```
The Vim plugin will pick up fzf binary available on the system. If fzf is not
found on `$PATH`, it will ask you if it should download the latest binary for
you.
To make sure that you have the latest version of the binary, set up
post-update hook like so:
```vim
Plug 'junegunn/fzf', { 'do': { -> fzf#install() } }
```
Summary
-------
The Vim plugin of fzf provides two core functions, and `:FZF` command which is
the basic file selector command built on top of them.
1. **`fzf#run([spec dict])`**
- Starts fzf inside Vim with the given spec
- `:call fzf#run({'source': 'ls'})`
2. **`fzf#wrap([spec dict]) -> (dict)`**
- Takes a spec for `fzf#run` and returns an extended version of it with
additional options for addressing global preferences (`g:fzf_xxx`)
- `:echo fzf#wrap({'source': 'ls'})`
- We usually *wrap* a spec with `fzf#wrap` before passing it to `fzf#run`
- `:call fzf#run(fzf#wrap({'source': 'ls'}))`
3. **`:FZF [fzf_options string] [path string]`**
- Basic fuzzy file selector
- A reference implementation for those who don't want to write VimScript
to implement custom commands
- If you're looking for more such commands, check out [fzf.vim](https://github.com/junegunn/fzf.vim) project.
The most important of all is `fzf#run`, but it would be easier to understand
the whole if we start off with `:FZF` command.
`:FZF[!]`
---------
```vim
" Look for files under current directory
:FZF
" Look for files under your home directory
:FZF ~
" With fzf command-line options
:FZF --reverse --info=inline /tmp
" Bang version starts fzf in fullscreen mode
:FZF!
```
Similarly to [ctrlp.vim](https://github.com/kien/ctrlp.vim), use enter key,
`CTRL-T`, `CTRL-X` or `CTRL-V` to open selected files in the current window,
in new tabs, in horizontal splits, or in vertical splits respectively.
Note that the environment variables `FZF_DEFAULT_COMMAND` and
`FZF_DEFAULT_OPTS` also apply here.
### Configuration
- `g:fzf_action`
- Customizable extra key bindings for opening selected files in different ways
- `g:fzf_layout`
- Determines the size and position of fzf window
- `g:fzf_colors`
- Customizes fzf colors to match the current color scheme
- `g:fzf_history_dir`
- Enables history feature
#### Examples
```vim
" This is the default extra key bindings
let g:fzf_action = {
\ 'ctrl-t': 'tab split',
\ 'ctrl-x': 'split',
\ 'ctrl-v': 'vsplit' }
" An action can be a reference to a function that processes selected lines
function! s:build_quickfix_list(lines)
call setqflist(map(copy(a:lines), '{ "filename": v:val, "lnum": 1 }'))
copen
cc
endfunction
let g:fzf_action = {
\ 'ctrl-q': function('s:build_quickfix_list'),
\ 'ctrl-t': 'tab split',
\ 'ctrl-x': 'split',
\ 'ctrl-v': 'vsplit' }
" Default fzf layout
" - Popup window (center of the screen)
let g:fzf_layout = { 'window': { 'width': 0.9, 'height': 0.6 } }
" - Popup window (center of the current window)
let g:fzf_layout = { 'window': { 'width': 0.9, 'height': 0.6, 'relative': v:true } }
" - Popup window (anchored to the bottom of the current window)
let g:fzf_layout = { 'window': { 'width': 0.9, 'height': 0.6, 'relative': v:true, 'yoffset': 1.0 } }
" - down / up / left / right
let g:fzf_layout = { 'down': '40%' }
" - Window using a Vim command
let g:fzf_layout = { 'window': 'enew' }
let g:fzf_layout = { 'window': '-tabnew' }
let g:fzf_layout = { 'window': '10new' }
" Customize fzf colors to match your color scheme
" - fzf#wrap translates this to a set of `--color` options
let g:fzf_colors =
\ { 'fg': ['fg', 'Normal'],
\ 'bg': ['bg', 'Normal'],
\ 'query': ['fg', 'Normal'],
\ 'hl': ['fg', 'Comment'],
\ 'fg+': ['fg', 'CursorLine', 'CursorColumn', 'Normal'],
\ 'bg+': ['bg', 'CursorLine', 'CursorColumn'],
\ 'hl+': ['fg', 'Statement'],
\ 'info': ['fg', 'PreProc'],
\ 'border': ['fg', 'Ignore'],
\ 'prompt': ['fg', 'Conditional'],
\ 'pointer': ['fg', 'Exception'],
\ 'marker': ['fg', 'Keyword'],
\ 'spinner': ['fg', 'Label'],
\ 'header': ['fg', 'Comment'] }
" Enable per-command history
" - History files will be stored in the specified directory
" - When set, CTRL-N and CTRL-P will be bound to 'next-history' and
" 'previous-history' instead of 'down' and 'up'.
let g:fzf_history_dir = '~/.local/share/fzf-history'
```
##### Explanation of `g:fzf_colors`
`g:fzf_colors` is a dictionary mapping fzf elements to a color specification
list:
element: [ component, group1 [, group2, ...] ]
- `element` is an fzf element to apply a color to:
| Element | Description |
| --- | --- |
| `fg` / `bg` / `hl` | Item (foreground / background / highlight) |
| `fg+` / `bg+` / `hl+` | Current item (foreground / background / highlight) |
| `preview-fg` / `preview-bg` | Preview window text and background |
| `hl` / `hl+` | Highlighted substrings (normal / current) |
| `gutter` | Background of the gutter on the left |
| `pointer` | Pointer to the current line (`>`) |
| `marker` | Multi-select marker (`>`) |
| `border` | Border around the window (`--border` and `--preview`) |
| `header` | Header (`--header` or `--header-lines`) |
| `info` | Info line (match counters) |
| `spinner` | Streaming input indicator |
| `query` | Query string |
| `disabled` | Query string when search is disabled |
| `prompt` | Prompt before query (`> `) |
| `pointer` | Pointer to the current line (`>`) |
- `component` specifies the component (`fg` / `bg`) from which to extract the
color when considering each of the following highlight groups
- `group1 [, group2, ...]` is a list of highlight groups that are searched (in
order) for a matching color definition
For example, consider the following specification:
```vim
'prompt': ['fg', 'Conditional', 'Comment'],
```
This means we color the **prompt**
- using the `fg` attribute of the `Conditional` if it exists,
- otherwise use the `fg` attribute of the `Comment` highlight group if it exists,
- otherwise fall back to the default color settings for the **prompt**.
You can examine the color option generated according the setting by printing
the result of `fzf#wrap()` function like so:
```vim
:echo fzf#wrap()
```
`fzf#run`
---------
`fzf#run()` function is the core of Vim integration. It takes a single
dictionary argument, *a spec*, and starts fzf process accordingly. At the very
least, specify `sink` option to tell what it should do with the selected
entry.
```vim
call fzf#run({'sink': 'e'})
```
We haven't specified the `source`, so this is equivalent to starting fzf on
command line without standard input pipe; fzf will traverse the file system
under the current directory to get the list of files. (If
`$FZF_DEFAULT_COMMAND` is set, fzf will use the output of the command
instead.) When you select one, it will open it with the sink, `:e` command. If
you want to open it in a new tab, you can pass `:tabedit` command instead as
the sink.
```vim
call fzf#run({'sink': 'tabedit'})
```
You can use any shell command as the source to generate the list. The
following example will list the files managed by git. It's equivalent to
running `git ls-files | fzf` on shell.
```vim
call fzf#run({'source': 'git ls-files', 'sink': 'e'})
```
fzf options can be specified as `options` entry in spec dictionary.
```vim
call fzf#run({'sink': 'tabedit', 'options': '--multi --reverse'})
```
You can also pass a layout option if you don't want fzf window to take up the
entire screen.
```vim
" up / down / left / right / window are allowed
call fzf#run({'source': 'git ls-files', 'sink': 'e', 'left': '40%'})
call fzf#run({'source': 'git ls-files', 'sink': 'e', 'window': '30vnew'})
```
`source` doesn't have to be an external shell command, you can pass a Vim
array as the source. In the next example, we pass the names of color
schemes as the source to implement a color scheme selector.
```vim
call fzf#run({'source': map(split(globpath(&rtp, 'colors/*.vim')),
\ 'fnamemodify(v:val, ":t:r")'),
\ 'sink': 'colo', 'left': '25%'})
```
The following table summarizes the available options.
| Option name | Type | Description |
| -------------------------- | ------------- | ---------------------------------------------------------------- |
| `source` | string | External command to generate input to fzf (e.g. `find .`) |
| `source` | list | Vim list as input to fzf |
| `sink` | string | Vim command to handle the selected item (e.g. `e`, `tabe`) |
| `sink` | funcref | Function to be called with each selected item |
| `sinklist` (or `sink*`) | funcref | Similar to `sink`, but takes the list of output lines at once |
| `exit` | funcref | Function to be called with the exit status of fzf (e.g. 0, 1, 2, 130) |
| `options` | string/list | Options to fzf |
| `dir` | string | Working directory |
| `up`/`down`/`left`/`right` | number/string | (Layout) Window position and size (e.g. `20`, `50%`) |
| `tmux` | string | (Layout) `--tmux` options (e.g. `90%,70%`) |
| `window` (Vim 8 / Neovim) | string | (Layout) Command to open fzf window (e.g. `vertical aboveleft 30new`) |
| `window` (Vim 8 / Neovim) | dict | (Layout) Popup window settings (e.g. `{'width': 0.9, 'height': 0.6}`) |
`options` entry can be either a string or a list. For simple cases, string
should suffice, but prefer to use list type to avoid escaping issues.
```vim
call fzf#run({'options': '--reverse --prompt "C:\\Program Files\\"'})
call fzf#run({'options': ['--reverse', '--prompt', 'C:\Program Files\']})
```
When `window` entry is a dictionary, fzf will start in a popup window. The
following options are allowed:
- Required:
- `width` [float range [0 ~ 1]] or [integer range [8 ~ ]]
- `height` [float range [0 ~ 1]] or [integer range [4 ~ ]]
- Optional:
- `yoffset` [float default 0.5 range [0 ~ 1]]
- `xoffset` [float default 0.5 range [0 ~ 1]]
- `relative` [boolean default v:false]
- `border` [string default `rounded` (`sharp` on Windows)]: Border style
- `rounded` / `sharp` / `horizontal` / `vertical` / `top` / `bottom` / `left` / `right` / `no[ne]`
`fzf#wrap`
----------
We have seen that several aspects of `:FZF` command can be configured with
a set of global option variables; different ways to open files
(`g:fzf_action`), window position and size (`g:fzf_layout`), color palette
(`g:fzf_colors`), etc.
So how can we make our custom `fzf#run` calls also respect those variables?
Simply by *"wrapping"* the spec dictionary with `fzf#wrap` before passing it
to `fzf#run`.
- **`fzf#wrap([name string], [spec dict], [fullscreen bool]) -> (dict)`**
- All arguments are optional. Usually we only need to pass a spec dictionary.
- `name` is for managing history files. It is ignored if
`g:fzf_history_dir` is not defined.
- `fullscreen` can be either `0` or `1` (default: 0).
`fzf#wrap` takes a spec and returns an extended version of it (also
a dictionary) with additional options for addressing global preferences. You
can examine the return value of it like so:
```vim
echo fzf#wrap({'source': 'ls'})
```
After we *"wrap"* our spec, we pass it to `fzf#run`.
```vim
call fzf#run(fzf#wrap({'source': 'ls'}))
```
Now it supports `CTRL-T`, `CTRL-V`, and `CTRL-X` key bindings (configurable
via `g:fzf_action`) and it opens fzf window according to `g:fzf_layout`
setting.
To make it easier to use, let's define `LS` command.
```vim
command! LS call fzf#run(fzf#wrap({'source': 'ls'}))
```
Type `:LS` and see how it works.
We would like to make `:LS!` (bang version) open fzf in fullscreen, just like
`:FZF!`. Add `-bang` to command definition, and use `<bang>` value to set
the last `fullscreen` argument of `fzf#wrap` (see `:help <bang>`).
```vim
" On :LS!, <bang> evaluates to '!', and '!0' becomes 1
command! -bang LS call fzf#run(fzf#wrap({'source': 'ls'}, <bang>0))
```
Our `:LS` command will be much more useful if we can pass a directory argument
to it, so that something like `:LS /tmp` is possible.
```vim
command! -bang -complete=dir -nargs=? LS
\ call fzf#run(fzf#wrap({'source': 'ls', 'dir': <q-args>}, <bang>0))
```
Lastly, if you have enabled `g:fzf_history_dir`, you might want to assign
a unique name to our command and pass it as the first argument to `fzf#wrap`.
```vim
" The query history for this command will be stored as 'ls' inside g:fzf_history_dir.
" The name is ignored if g:fzf_history_dir is not defined.
command! -bang -complete=dir -nargs=? LS
\ call fzf#run(fzf#wrap('ls', {'source': 'ls', 'dir': <q-args>}, <bang>0))
```
### Global options supported by `fzf#wrap`
- `g:fzf_layout`
- `g:fzf_action`
- **Works only when no custom `sink` (or `sinklist`) is provided**
- Having custom sink usually means that each entry is not an ordinary
file path (e.g. name of color scheme), so we can't blindly apply the
same strategy (i.e. `tabedit some-color-scheme` doesn't make sense)
- `g:fzf_colors`
- `g:fzf_history_dir`
Tips
----
### fzf inside terminal buffer
On the latest versions of Vim and Neovim, fzf will start in a terminal buffer.
If you find the default ANSI colors to be different, consider configuring the
colors using `g:terminal_ansi_colors` in regular Vim or `g:terminal_color_x`
in Neovim.
```vim
" Terminal colors for seoul256 color scheme
if has('nvim')
let g:terminal_color_0 = '#4e4e4e'
let g:terminal_color_1 = '#d68787'
let g:terminal_color_2 = '#5f865f'
let g:terminal_color_3 = '#d8af5f'
let g:terminal_color_4 = '#85add4'
let g:terminal_color_5 = '#d7afaf'
let g:terminal_color_6 = '#87afaf'
let g:terminal_color_7 = '#d0d0d0'
let g:terminal_color_8 = '#626262'
let g:terminal_color_9 = '#d75f87'
let g:terminal_color_10 = '#87af87'
let g:terminal_color_11 = '#ffd787'
let g:terminal_color_12 = '#add4fb'
let g:terminal_color_13 = '#ffafaf'
let g:terminal_color_14 = '#87d7d7'
let g:terminal_color_15 = '#e4e4e4'
else
let g:terminal_ansi_colors = [
\ '#4e4e4e', '#d68787', '#5f865f', '#d8af5f',
\ '#85add4', '#d7afaf', '#87afaf', '#d0d0d0',
\ '#626262', '#d75f87', '#87af87', '#ffd787',
\ '#add4fb', '#ffafaf', '#87d7d7', '#e4e4e4'
\ ]
endif
```
### Starting fzf in a popup window
```vim
" Required:
" - width [float range [0 ~ 1]] or [integer range [8 ~ ]]
" - height [float range [0 ~ 1]] or [integer range [4 ~ ]]
"
" Optional:
" - xoffset [float default 0.5 range [0 ~ 1]]
" - yoffset [float default 0.5 range [0 ~ 1]]
" - relative [boolean default v:false]
" - border [string default 'rounded']: Border style
" - 'rounded' / 'sharp' / 'horizontal' / 'vertical' / 'top' / 'bottom' / 'left' / 'right'
let g:fzf_layout = { 'window': { 'width': 0.9, 'height': 0.6 } }
```
Alternatively, you can make fzf open in a tmux popup window (requires tmux 3.2
or above) by putting `--tmux` option value in `tmux` key.
```vim
" See `--tmux` option in `man fzf` for available options
" [center|top|bottom|left|right][,SIZE[%]][,SIZE[%]]
if exists('$TMUX')
let g:fzf_layout = { 'tmux': '90%,70%' }
else
let g:fzf_layout = { 'window': { 'width': 0.9, 'height': 0.6 } }
endif
```
### Hide statusline
When fzf starts in a terminal buffer, the file type of the buffer is set to
`fzf`. So you can set up `FileType fzf` autocmd to customize the settings of
the windo
gitextract_7059u6i9/ ├── .editorconfig ├── .github/ │ ├── FUNDING.yml │ ├── ISSUE_TEMPLATE/ │ │ └── issue_template.yml │ ├── dependabot.yml │ ├── labeler.yml │ └── workflows/ │ ├── codeql-analysis.yml │ ├── depsreview.yaml │ ├── labeler.yml │ ├── linux.yml │ ├── macos.yml │ ├── sponsors.yml │ ├── typos.yml │ └── winget.yml ├── .gitignore ├── .goreleaser.yml ├── .rubocop.yml ├── .tool-versions ├── ADVANCED.md ├── BUILD.md ├── CHANGELOG.md ├── Dockerfile ├── Gemfile ├── LICENSE ├── Makefile ├── README-VIM.md ├── README.md ├── SECURITY.md ├── bin/ │ ├── fzf-preview.sh │ └── fzf-tmux ├── doc/ │ └── fzf.txt ├── go.mod ├── go.sum ├── install ├── install.ps1 ├── main.go ├── man/ │ └── man1/ │ ├── fzf-tmux.1 │ └── fzf.1 ├── plugin/ │ └── fzf.vim ├── shell/ │ ├── common.fish │ ├── common.sh │ ├── completion.bash │ ├── completion.fish │ ├── completion.zsh │ ├── key-bindings.bash │ ├── key-bindings.fish │ ├── key-bindings.zsh │ └── update.sh ├── src/ │ ├── LICENSE │ ├── actiontype_string.go │ ├── algo/ │ │ ├── SIMD.md │ │ ├── algo.go │ │ ├── algo_test.go │ │ ├── indexbyte2_amd64.go │ │ ├── indexbyte2_amd64.s │ │ ├── indexbyte2_arm64.go │ │ ├── indexbyte2_arm64.s │ │ ├── indexbyte2_other.go │ │ ├── indexbyte2_test.go │ │ └── normalize.go │ ├── ansi.go │ ├── ansi_test.go │ ├── cache.go │ ├── cache_test.go │ ├── chunklist.go │ ├── chunklist_test.go │ ├── constants.go │ ├── core.go │ ├── functions.go │ ├── history.go │ ├── history_test.go │ ├── item.go │ ├── item_test.go │ ├── matcher.go │ ├── merger.go │ ├── merger_test.go │ ├── options.go │ ├── options_no_pprof.go │ ├── options_pprof.go │ ├── options_pprof_test.go │ ├── options_test.go │ ├── pattern.go │ ├── pattern_test.go │ ├── protector/ │ │ ├── protector.go │ │ └── protector_openbsd.go │ ├── proxy.go │ ├── proxy_unix.go │ ├── proxy_windows.go │ ├── reader.go │ ├── reader_test.go │ ├── result.go │ ├── result_others.go │ ├── result_test.go │ ├── result_x86.go │ ├── server.go │ ├── terminal.go │ ├── terminal_test.go │ ├── terminal_unix.go │ ├── terminal_windows.go │ ├── tmux.go │ ├── tokenizer.go │ ├── tokenizer_test.go │ ├── tui/ │ │ ├── dummy.go │ │ ├── eventtype_string.go │ │ ├── light.go │ │ ├── light_test.go │ │ ├── light_unix.go │ │ ├── light_windows.go │ │ ├── tcell.go │ │ ├── tcell_test.go │ │ ├── ttyname_unix.go │ │ ├── ttyname_windows.go │ │ ├── tui.go │ │ └── tui_test.go │ ├── util/ │ │ ├── atexit.go │ │ ├── atexit_test.go │ │ ├── atomicbool.go │ │ ├── atomicbool_test.go │ │ ├── chars.go │ │ ├── chars_test.go │ │ ├── concurrent_set.go │ │ ├── eventbox.go │ │ ├── eventbox_test.go │ │ ├── slab.go │ │ ├── util.go │ │ ├── util_test.go │ │ ├── util_unix.go │ │ └── util_windows.go │ ├── winpty.go │ └── winpty_windows.go ├── test/ │ ├── lib/ │ │ ├── common.fish │ │ ├── common.rb │ │ └── common.sh │ ├── runner.rb │ ├── test_core.rb │ ├── test_exec.rb │ ├── test_filter.rb │ ├── test_layout.rb │ ├── test_preview.rb │ ├── test_raw.rb │ ├── test_server.rb │ ├── test_shell_integration.rb │ └── vim/ │ └── fzf.vader ├── typos.toml └── uninstall
SYMBOL INDEX (1998 symbols across 88 files)
FILE: main.go
function printScript (line 38) | func printScript(label string, content []byte) {
function exit (line 44) | func exit(code int, err error) {
function main (line 51) | func main() {
FILE: src/actiontype_string.go
function _ (line 7) | func _() {
constant _actionType_name (line 191) | _actionType_name = "actIgnoreactStartactClickactInvalidactBracketedPaste...
method String (line 195) | func (i actionType) String() string {
FILE: src/algo/algo.go
constant whiteChars (line 95) | whiteChars = " \t\n\v\f\r\x85\xA0"
function indexAt (line 97) | func indexAt(index int, max int, forward bool) int {
type Result (line 105) | type Result struct
constant scoreMatch (line 113) | scoreMatch = 16
constant scoreGapStart (line 114) | scoreGapStart = -3
constant scoreGapExtension (line 115) | scoreGapExtension = -1
constant bonusBoundary (line 123) | bonusBoundary = scoreMatch / 2
constant bonusNonWord (line 128) | bonusNonWord = scoreMatch / 2
constant bonusCamel123 (line 133) | bonusCamel123 = bonusBoundary + scoreGapExtension
constant bonusConsecutive (line 138) | bonusConsecutive = -(scoreGapStart + scoreGapExtension)
constant bonusFirstCharMultiplier (line 145) | bonusFirstCharMultiplier = 2
type charClass (line 164) | type charClass
constant charWhite (line 167) | charWhite charClass = iota
constant charNonWord (line 168) | charNonWord
constant charDelimiter (line 169) | charDelimiter
constant charLower (line 170) | charLower
constant charUpper (line 171) | charUpper
constant charLetter (line 172) | charLetter
constant charNumber (line 173) | charNumber
function Init (line 176) | func Init(scheme string) bool {
function posArray (line 220) | func posArray(withPos bool, len int) *[]int {
function alloc16 (line 228) | func alloc16(offset int, slab *util.Slab, size int) (int, []int16) {
function alloc32 (line 236) | func alloc32(offset int, slab *util.Slab, size int) (int, []int32) {
function charClassOfNonAscii (line 244) | func charClassOfNonAscii(char rune) charClass {
function charClassOf (line 261) | func charClassOf(char rune) charClass {
function bonusFor (line 268) | func bonusFor(prevClass charClass, class charClass) int16 {
function bonusAt (line 298) | func bonusAt(input *util.Chars, idx int) int16 {
function normalizeRune (line 305) | func normalizeRune(r rune) rune {
type Algo (line 320) | type Algo
function trySkip (line 322) | func trySkip(input *util.Chars, caseSensitive bool, b byte, from int) int {
function isAscii (line 339) | func isAscii(runes []rune) bool {
function asciiFuzzyIndex (line 348) | func asciiFuzzyIndex(input *util.Chars, pattern []rune, caseSensitive bo...
function debugV2 (line 392) | func debugV2(T []rune, pattern []rune, F []int32, lastIdx int, H []int16...
function FuzzyMatchV2 (line 428) | func FuzzyMatchV2(caseSensitive bool, normalize bool, forward bool, inpu...
function calculateScore (line 651) | func calculateScore(caseSensitive bool, normalize bool, text *util.Chars...
function FuzzyMatchV1 (line 711) | func FuzzyMatchV1(caseSensitive bool, normalize bool, forward bool, text...
function ExactMatchNaive (line 801) | func ExactMatchNaive(caseSensitive bool, normalize bool, forward bool, t...
function ExactMatchBoundary (line 805) | func ExactMatchBoundary(caseSensitive bool, normalize bool, forward bool...
function exactMatchNaive (line 809) | func exactMatchNaive(caseSensitive bool, normalize bool, forward bool, b...
function PrefixMatch (line 917) | func PrefixMatch(caseSensitive bool, normalize bool, forward bool, text ...
function SuffixMatch (line 949) | func SuffixMatch(caseSensitive bool, normalize bool, forward bool, text ...
function EqualMatch (line 983) | func EqualMatch(caseSensitive bool, normalize bool, forward bool, text *...
FILE: src/algo/algo_test.go
function init (line 12) | func init() {
function assertMatch (line 16) | func assertMatch(t *testing.T, fun Algo, caseSensitive, forward bool, in...
function assertMatch2 (line 20) | func assertMatch2(t *testing.T, fun Algo, caseSensitive, normalize, forw...
function TestFuzzyMatch (line 46) | func TestFuzzyMatch(t *testing.T) {
function TestFuzzyMatchBackward (line 103) | func TestFuzzyMatchBackward(t *testing.T) {
function TestExactMatchNaive (line 111) | func TestExactMatchNaive(t *testing.T) {
function TestExactMatchNaiveBackward (line 127) | func TestExactMatchNaiveBackward(t *testing.T) {
function TestPrefixMatch (line 134) | func TestPrefixMatch(t *testing.T) {
function TestSuffixMatch (line 150) | func TestSuffixMatch(t *testing.T) {
function TestEmptyPattern (line 170) | func TestEmptyPattern(t *testing.T) {
function TestNormalize (line 180) | func TestNormalize(t *testing.T) {
function TestLongString (line 195) | func TestLongString(t *testing.T) {
function TestLongStringWithNormalize (line 204) | func TestLongStringWithNormalize(t *testing.T) {
FILE: src/algo/indexbyte2_amd64.go
function init (line 7) | func init() {
function cpuHasAVX2 (line 12) | func cpuHasAVX2() bool
function IndexByteTwo (line 18) | func IndexByteTwo(s []byte, b1, b2 byte) int
function lastIndexByteTwo (line 24) | func lastIndexByteTwo(s []byte, b1, b2 byte) int
FILE: src/algo/indexbyte2_arm64.go
function IndexByteTwo (line 10) | func IndexByteTwo(s []byte, b1, b2 byte) int
function lastIndexByteTwo (line 17) | func lastIndexByteTwo(s []byte, b1, b2 byte) int
FILE: src/algo/indexbyte2_other.go
function IndexByteTwo (line 9) | func IndexByteTwo(s []byte, b1, b2 byte) int {
function lastIndexByteTwo (line 26) | func lastIndexByteTwo(s []byte, b1, b2 byte) int {
FILE: src/algo/indexbyte2_test.go
function TestIndexByteTwo (line 8) | func TestIndexByteTwo(t *testing.T) {
function TestLastIndexByteTwo (line 77) | func TestLastIndexByteTwo(t *testing.T) {
function FuzzIndexByteTwo (line 145) | func FuzzIndexByteTwo(f *testing.F) {
function FuzzLastIndexByteTwo (line 158) | func FuzzLastIndexByteTwo(f *testing.F) {
function refIndexByteTwo (line 172) | func refIndexByteTwo(s []byte, b1, b2 byte) int {
function loopIndexByteTwo (line 187) | func loopIndexByteTwo(s []byte, b1, b2 byte) int {
function refLastIndexByteTwo (line 196) | func refLastIndexByteTwo(s []byte, b1, b2 byte) int {
function benchIndexByteTwo (line 205) | func benchIndexByteTwo(b *testing.B, size int, pos int) {
function benchLastIndexByteTwo (line 230) | func benchLastIndexByteTwo(b *testing.B, size int, pos int) {
function BenchmarkIndexByteTwo_10 (line 254) | func BenchmarkIndexByteTwo_10(b *testing.B) { benchIndexByteTwo(b,...
function BenchmarkIndexByteTwo_100 (line 255) | func BenchmarkIndexByteTwo_100(b *testing.B) { benchIndexByteTwo(b,...
function BenchmarkIndexByteTwo_1000 (line 256) | func BenchmarkIndexByteTwo_1000(b *testing.B) { benchIndexByteTwo(b,...
function BenchmarkLastIndexByteTwo_10 (line 257) | func BenchmarkLastIndexByteTwo_10(b *testing.B) { benchLastIndexByteTw...
function BenchmarkLastIndexByteTwo_100 (line 258) | func BenchmarkLastIndexByteTwo_100(b *testing.B) { benchLastIndexByteTw...
function BenchmarkLastIndexByteTwo_1000 (line 259) | func BenchmarkLastIndexByteTwo_1000(b *testing.B) { benchLastIndexByteTw...
FILE: src/algo/normalize.go
function NormalizeRunes (line 576) | func NormalizeRunes(runes []rune) []rune {
FILE: src/ansi.go
type ansiOffset (line 13) | type ansiOffset struct
type url (line 18) | type url struct
type ansiState (line 23) | type ansiState struct
method colored (line 32) | func (s *ansiState) colored() bool {
method equals (line 36) | func (s *ansiState) equals(t *ansiState) bool {
method ToString (line 43) | func (s *ansiState) ToString() string {
function toAnsiStringUl (line 93) | func toAnsiStringUl(color tui.Color) string {
function toAnsiString (line 107) | func toAnsiString(color tui.Color, offset int) string {
function matchOperatingSystemCommand (line 127) | func matchOperatingSystemCommand(s string, start int) int {
function matchControlSequence (line 158) | func matchControlSequence(s string) int {
function isCtrlSeqStart (line 178) | func isCtrlSeqStart(c uint8) bool {
function nextAnsiEscapeSequence (line 190) | func nextAnsiEscapeSequence(s string) (int, int) {
function extractColor (line 260) | func extractColor(str string, state *ansiState, proc func(string, *ansiS...
function parseAnsiCode (line 371) | func parseAnsiCode(s string) (int, byte, string) {
function interpretCode (line 405) | func interpretCode(ansiCode string, prevState *ansiState) ansiState {
FILE: src/ansi_test.go
function testParserReference (line 27) | func testParserReference(t testing.TB, str string) {
function TestNextAnsiEscapeSequence (line 69) | func TestNextAnsiEscapeSequence(t *testing.T) {
function TestNextAnsiEscapeSequence_Fuzz_Modified (line 100) | func TestNextAnsiEscapeSequence_Fuzz_Modified(t *testing.T) {
function TestNextAnsiEscapeSequence_Fuzz_Random (line 160) | func TestNextAnsiEscapeSequence_Fuzz_Random(t *testing.T) {
function TestExtractColor (line 190) | func TestExtractColor(t *testing.T) {
function TestAnsiCodeStringConversion (line 362) | func TestAnsiCodeStringConversion(t *testing.T) {
function TestParseAnsiCode (line 410) | func TestParseAnsiCode(t *testing.T) {
function TestInterpretCodeUnderlineStyles (line 439) | func TestInterpretCodeUnderlineStyles(t *testing.T) {
function TestInterpretCodeUnderlineColor (line 495) | func TestInterpretCodeUnderlineColor(t *testing.T) {
constant ansiBenchmarkString (line 520) | ansiBenchmarkString = "\x1b[38;5;81m\x1b[01;31m\x1b[Kkernel/\x1b[0m\x1b[...
function BenchmarkNextAnsiEscapeSequence (line 524) | func BenchmarkNextAnsiEscapeSequence(b *testing.B) {
function BenchmarkNextAnsiEscapeSequence_Regex (line 540) | func BenchmarkNextAnsiEscapeSequence_Regex(b *testing.B) {
function BenchmarkExtractColor (line 554) | func BenchmarkExtractColor(b *testing.B) {
FILE: src/cache.go
type ChunkBitmap (line 6) | type ChunkBitmap
type queryCache (line 9) | type queryCache
type ChunkCache (line 12) | type ChunkCache struct
method Clear (line 22) | func (cc *ChunkCache) Clear() {
method retire (line 28) | func (cc *ChunkCache) retire(chunk ...*Chunk) {
method Add (line 37) | func (cc *ChunkCache) Add(chunk *Chunk, key string, bitmap ChunkBitmap...
method Lookup (line 54) | func (cc *ChunkCache) Lookup(chunk *Chunk, key string) *ChunkBitmap {
method Search (line 72) | func (cc *ChunkCache) Search(chunk *Chunk, key string) *ChunkBitmap {
function NewChunkCache (line 18) | func NewChunkCache() *ChunkCache {
FILE: src/cache_test.go
function TestChunkCache (line 5) | func TestChunkCache(t *testing.T) {
FILE: src/chunklist.go
type Chunk (line 6) | type Chunk struct
method push (line 31) | func (c *Chunk) push(trans ItemBuilder, data []byte) bool {
method IsFull (line 40) | func (c *Chunk) IsFull() bool {
method lastIndex (line 44) | func (c *Chunk) lastIndex(minValue int32) int32 {
type ItemBuilder (line 12) | type ItemBuilder
type ChunkList (line 15) | type ChunkList struct
method lastChunk (line 51) | func (cl *ChunkList) lastChunk() *Chunk {
method Push (line 83) | func (cl *ChunkList) Push(data []byte) bool {
method Clear (line 96) | func (cl *ChunkList) Clear() {
method ForEachItem (line 104) | func (cl *ChunkList) ForEachItem(fn func(*Item), done func()) {
method Snapshot (line 118) | func (cl *ChunkList) Snapshot(tail int) ([]*Chunk, int, bool) {
function NewChunkList (line 23) | func NewChunkList(cache *ChunkCache, trans ItemBuilder) *ChunkList {
function GetItems (line 56) | func GetItems(chunks []*Chunk, n int) []Item {
function CountItems (line 70) | func CountItems(cs []*Chunk) int {
FILE: src/chunklist_test.go
function TestChunkList (line 10) | func TestChunkList(t *testing.T) {
function TestChunkListTail (line 82) | func TestChunkListTail(t *testing.T) {
FILE: src/constants.go
constant coordinatorDelayMax (line 12) | coordinatorDelayMax time.Duration = 100 * time.Millisecond
constant coordinatorDelayStep (line 13) | coordinatorDelayStep time.Duration = 10 * time.Millisecond
constant readerBufferSize (line 16) | readerBufferSize = 64 * 1024
constant readerSlabSize (line 17) | readerSlabSize = 128 * 1024
constant readerPollIntervalMin (line 18) | readerPollIntervalMin = 10 * time.Millisecond
constant readerPollIntervalStep (line 19) | readerPollIntervalStep = 5 * time.Millisecond
constant readerPollIntervalMax (line 20) | readerPollIntervalMax = 50 * time.Millisecond
constant initialDelay (line 23) | initialDelay = 20 * time.Millisecond
constant initialDelayTac (line 24) | initialDelayTac = 100 * time.Millisecond
constant spinnerDuration (line 25) | spinnerDuration = 100 * time.Millisecond
constant previewCancelWait (line 26) | previewCancelWait = 500 * time.Millisecond
constant previewChunkDelay (line 27) | previewChunkDelay = 100 * time.Millisecond
constant previewDelayed (line 28) | previewDelayed = 500 * time.Millisecond
constant maxPatternLength (line 29) | maxPatternLength = 1000
constant maxMulti (line 30) | maxMulti = math.MaxInt32
constant maxBgProcesses (line 33) | maxBgProcesses = 30
constant maxBgProcessesPerAction (line 34) | maxBgProcessesPerAction = 3
constant progressMinDuration (line 37) | progressMinDuration = 200 * time.Millisecond
constant chunkSize (line 40) | chunkSize int = 1024
constant chunkBitWords (line 41) | chunkBitWords = (chunkSize + 63) / 64
constant slab16Size (line 44) | slab16Size int = 100 * 1024
constant slab32Size (line 45) | slab32Size int = 2048
constant queryCacheMax (line 48) | queryCacheMax int = chunkSize / 2
constant mergerCacheMax (line 51) | mergerCacheMax int = 100000
constant defaultHistoryMax (line 54) | defaultHistoryMax int = 1000
constant defaultJumpLabels (line 57) | defaultJumpLabels string = "asdfghjklqwertyuiopzxcvbnm1234567890ASDFGHJK...
constant EvtReadNew (line 62) | EvtReadNew util.EventType = iota
constant EvtReadFin (line 63) | EvtReadFin
constant EvtSearchNew (line 64) | EvtSearchNew
constant EvtSearchProgress (line 65) | EvtSearchProgress
constant EvtSearchFin (line 66) | EvtSearchFin
constant EvtReady (line 67) | EvtReady
constant EvtQuit (line 68) | EvtQuit
constant ExitOk (line 72) | ExitOk = 0
constant ExitNoMatch (line 73) | ExitNoMatch = 1
constant ExitError (line 74) | ExitError = 2
constant ExitBecome (line 75) | ExitBecome = 126
constant ExitInterrupt (line 76) | ExitInterrupt = 130
FILE: src/core.go
type revision (line 23) | type revision struct
method bumpMajor (line 28) | func (r *revision) bumpMajor() {
method bumpMinor (line 33) | func (r *revision) bumpMinor() {
method compatible (line 37) | func (r revision) compatible(other revision) bool {
function buildItemTransformer (line 41) | func buildItemTransformer(opts *Options) func(*Item) string {
function Run (line 54) | func Run(opts *Options) (int, error) {
FILE: src/functions.go
function WriteTemporaryFile (line 9) | func WriteTemporaryFile(data []string, printSep string) string {
function removeFiles (line 23) | func removeFiles(files []string) {
function stringBytes (line 29) | func stringBytes(data string) []byte {
function byteString (line 33) | func byteString(data []byte) string {
FILE: src/history.go
type History (line 10) | type History struct
method append (line 53) | func (h *History) append(line string) error {
method override (line 67) | func (h *History) override(str string) {
method current (line 76) | func (h *History) current() string {
method previous (line 83) | func (h *History) previous() string {
method next (line 90) | func (h *History) next() string {
function NewHistory (line 19) | func NewHistory(path string, maxSize int) (*History, error) {
FILE: src/history_test.go
function TestHistory (line 9) | func TestHistory(t *testing.T) {
FILE: src/item.go
type transformed (line 9) | type transformed struct
type Item (line 17) | type Item struct
method Index (line 25) | func (item *Item) Index() int32 {
method TrimLength (line 31) | func (item *Item) TrimLength() uint16 {
method Colors (line 36) | func (item *Item) Colors() []ansiOffset {
method AsString (line 44) | func (item *Item) AsString(stripAnsi bool) string {
method acceptNth (line 55) | func (item *Item) acceptNth(stripAnsi bool, delimiter Delimiter, trans...
FILE: src/item_test.go
function TestStringPtr (line 9) | func TestStringPtr(t *testing.T) {
FILE: src/matcher.go
type MatchRequest (line 14) | type MatchRequest struct
type MatchResult (line 22) | type MatchResult struct
method cacheable (line 28) | func (mr MatchResult) cacheable() bool {
method final (line 32) | func (mr MatchResult) final() bool {
type Matcher (line 37) | type Matcher struct
method Loop (line 81) | func (m *Matcher) Loop() {
method scan (line 157) | func (m *Matcher) scan(request MatchRequest) MatchResult {
method Reset (line 243) | func (m *Matcher) Reset(chunks []*Chunk, patternRunes []rune, cancel b...
method CancelScan (line 258) | func (m *Matcher) CancelScan() {
method ResumeScan (line 265) | func (m *Matcher) ResumeScan() {
method Stop (line 269) | func (m *Matcher) Stop() {
constant reqRetry (line 54) | reqRetry util.EventType = iota
constant reqReset (line 55) | reqReset
function NewMatcher (line 59) | func NewMatcher(cache *ChunkCache, patternBuilder func([]rune) *Pattern,
type partialResult (line 152) | type partialResult struct
FILE: src/merger.go
function EmptyMerger (line 6) | func EmptyMerger(revision revision) *Merger {
type Merger (line 12) | type Merger struct
method Revision (line 79) | func (mg *Merger) Revision() revision {
method Length (line 84) | func (mg *Merger) Length() int {
method First (line 88) | func (mg *Merger) First() Result {
method FindIndex (line 96) | func (mg *Merger) FindIndex(itemIndex int32) int {
method Get (line 115) | func (mg *Merger) Get(idx int) Result {
method ToMap (line 142) | func (mg *Merger) ToMap() map[int32]Result {
method cacheable (line 151) | func (mg *Merger) cacheable() bool {
method mergedGet (line 155) | func (mg *Merger) mergedGet(idx int) Result {
function PassMerger (line 31) | func PassMerger(chunks *[]*Chunk, tac bool, revision revision, startInde...
function NewMerger (line 57) | func NewMerger(pattern *Pattern, lists [][]Result, sorted bool, tac bool...
FILE: src/merger_test.go
function assert (line 12) | func assert(t *testing.T, cond bool, msg ...string) {
function randResult (line 18) | func randResult() Result {
function TestEmptyMerger (line 25) | func TestEmptyMerger(t *testing.T) {
function buildLists (line 33) | func buildLists(partiallySorted bool) ([][]Result, []Result) {
function TestMergerUnsorted (line 56) | func TestMergerUnsorted(t *testing.T) {
function TestMergerSorted (line 83) | func TestMergerSorted(t *testing.T) {
FILE: src/options.go
constant Usage (line 22) | Usage = `fzf is an interactive filter program for any kind of list.
constant defaultInfoPrefix (line 250) | defaultInfoPrefix = " < "
type Case (line 253) | type Case
constant CaseSmart (line 257) | CaseSmart Case = iota
constant CaseIgnore (line 258) | CaseIgnore
constant CaseRespect (line 259) | CaseRespect
type criterion (line 263) | type criterion
constant byScore (line 266) | byScore criterion = iota
constant byChunk (line 267) | byChunk
constant byLength (line 268) | byLength
constant byBegin (line 269) | byBegin
constant byEnd (line 270) | byEnd
constant byPathname (line 271) | byPathname
type heightSpec (line 274) | type heightSpec struct
type sizeSpec (line 282) | type sizeSpec struct
method String (line 287) | func (s sizeSpec) String() string {
function defaultMargin (line 294) | func defaultMargin() [4]sizeSpec {
type trackOption (line 298) | type trackOption struct
method Disabled (line 308) | func (t trackOption) Disabled() bool {
method Global (line 312) | func (t trackOption) Global() bool {
method Current (line 316) | func (t trackOption) Current() bool {
function trackCurrent (line 320) | func trackCurrent(index int32) trackOption {
type windowPosition (line 324) | type windowPosition
constant posUp (line 327) | posUp windowPosition = iota
constant posDown (line 328) | posDown
constant posLeft (line 329) | posLeft
constant posRight (line 330) | posRight
constant posCenter (line 331) | posCenter
type tmuxOptions (line 334) | type tmuxOptions struct
type layoutType (line 342) | type layoutType
constant layoutDefault (line 345) | layoutDefault layoutType = iota
constant layoutReverse (line 346) | layoutReverse
constant layoutReverseList (line 347) | layoutReverseList
type infoStyle (line 350) | type infoStyle
constant infoDefault (line 353) | infoDefault infoStyle = iota
constant infoRight (line 354) | infoRight
constant infoInline (line 355) | infoInline
constant infoInlineRight (line 356) | infoInlineRight
constant infoHidden (line 357) | infoHidden
type labelOpts (line 360) | type labelOpts struct
type previewOpts (line 366) | type previewOpts struct
method Visible (line 383) | func (o *previewOpts) Visible() bool {
method Toggle (line 387) | func (o *previewOpts) Toggle() {
method Border (line 391) | func (o *previewOpts) Border() tui.BorderShape {
method aboveOrBelow (line 511) | func (a previewOpts) aboveOrBelow() bool {
method compare (line 523) | func (o *previewOpts) compare(active *previewOpts, b *previewOpts) pre...
function defaultTmuxOptions (line 408) | func defaultTmuxOptions(index int) *tmuxOptions {
function parseTmuxOptions (line 416) | func parseTmuxOptions(arg string, index int) (*tmuxOptions, error) {
function parseLabelPosition (line 492) | func parseLabelPosition(opts *labelOpts, arg string) error {
type previewOptsCompare (line 515) | type previewOptsCompare
constant previewOptsSame (line 518) | previewOptsSame previewOptsCompare = iota
constant previewOptsDifferentContentLayout (line 519) | previewOptsDifferentContentLayout
constant previewOptsDifferentLayout (line 520) | previewOptsDifferentLayout
function firstLine (line 557) | func firstLine(s string) string {
type walkerOpts (line 561) | type walkerOpts struct
type Options (line 569) | type Options struct
method useTmux (line 3626) | func (opts *Options) useTmux() bool {
method noSeparatorLine (line 3630) | func (opts *Options) noSeparatorLine() bool {
method hasReloadOrTransformOnStart (line 3904) | func (opts *Options) hasReloadOrTransformOnStart() bool {
method extractReloadOnStart (line 3915) | func (opts *Options) extractReloadOnStart() string {
function filterNonEmpty (line 693) | func filterNonEmpty(input []string) []string {
function defaultPreviewOpts (line 703) | func defaultPreviewOpts(command string) previewOpts {
function defaultOptions (line 713) | func defaultOptions() *Options {
function isDir (line 807) | func isDir(path string) bool {
function atoi (line 812) | func atoi(str string) (int, error) {
function atof (line 820) | func atof(str string) (float64, error) {
function splitNth (line 828) | func splitNth(str string) ([]Range, error) {
function nthTransformer (line 845) | func nthTransformer(str string) (func(Delimiter) func([]Token, int32) st...
function delimiterRegexp (line 909) | func delimiterRegexp(str string) Delimiter {
function isAlphabet (line 933) | func isAlphabet(char uint8) bool {
function isNumeric (line 937) | func isNumeric(char uint8) bool {
function parseAlgo (line 941) | func parseAlgo(str string) (algo.Algo, error) {
function parseBorder (line 951) | func parseBorder(str string, optional bool) (tui.BorderShape, error) {
function parseKeyChords (line 988) | func parseKeyChords(str string, message string) (map[tui.Event]string, [...
function parseScheme (line 1296) | func parseScheme(str string) (string, []criterion, error) {
function parseTiebreak (line 1309) | func parseTiebreak(str string) ([]criterion, error) {
function dupeTheme (line 1368) | func dupeTheme(theme *tui.ColorTheme) *tui.ColorTheme {
function parseTheme (line 1373) | func parseTheme(defaultTheme *tui.ColorTheme, str string) (*tui.ColorThe...
function parseWalkerOpts (line 1590) | func parseWalkerOpts(str string) (walkerOpts, error) {
function firstKey (line 1620) | func firstKey(keymap map[tui.Event]string) tui.Event {
constant escapedColon (line 1628) | escapedColon = 0
constant escapedComma (line 1629) | escapedComma = 1
constant escapedPlus (line 1630) | escapedPlus = 2
function init (line 1633) | func init() {
function maskActionContents (line 1640) | func maskActionContents(action string) string {
function parseSingleActionList (line 1698) | func parseSingleActionList(str string) ([]*action, error) {
function parseActionList (line 1704) | func parseActionList(masked string, original string, prevActions []*acti...
function parseKeymap (line 1975) | func parseKeymap(keymap map[tui.Event][]*action, str string) error {
function isExecuteAction (line 2021) | func isExecuteAction(str string) actionType {
function parseToggleSort (line 2168) | func parseToggleSort(keymap map[tui.Event][]*action, str string) error {
function strLines (line 2180) | func strLines(str string) []string {
function parseSize (line 2184) | func parseSize(str string, maxPercent float64, label string) (sizeSpec, ...
function parseHeight (line 2217) | func parseHeight(str string, index int) (heightSpec, error) {
function parseLayout (line 2240) | func parseLayout(str string) (layoutType, error) {
function parseInfoStyle (line 2252) | func parseInfoStyle(str string) (infoStyle, string, error) {
function parsePreviewWindow (line 2279) | func parsePreviewWindow(opts *previewOpts, input string) error {
function parsePreviewWindowImpl (line 2283) | func parsePreviewWindowImpl(opts *previewOpts, input string) error {
function parseMargin (line 2391) | func parseMargin(opt string, margin string) ([4]sizeSpec, error) {
function parseMarkerMultiLine (line 2446) | func parseMarkerMultiLine(str string) (*[3]string, error) {
function optString (line 2480) | func optString(arg string, prefix string) (bool, string) {
function parseOptions (line 2487) | func parseOptions(index *int, opts *Options, allArgs []string) error {
function applyPreset (line 3496) | func applyPreset(opts *Options, preset string) error {
function validateSign (line 3559) | func validateSign(sign string, signOptName string, maxWidth int) error {
function validateOptions (line 3566) | func validateOptions(opts *Options) error {
function noSeparatorLine (line 3616) | func noSeparatorLine(style infoStyle, separator bool) bool {
function postProcessOptions (line 3640) | func postProcessOptions(opts *Options) error {
function parseShellWords (line 3830) | func parseShellWords(str string) ([]string, error) {
function ParseOptions (line 3837) | func ParseOptions(useDefaults bool, args []string) (*Options, error) {
FILE: src/options_no_pprof.go
method initProfiling (line 8) | func (o *Options) initProfiling() error {
FILE: src/options_pprof.go
method initProfiling (line 15) | func (o *Options) initProfiling() error {
FILE: src/options_pprof_test.go
function TestInitProfiling (line 20) | func TestInitProfiling(t *testing.T) {
FILE: src/options_test.go
function TestDelimiterRegex (line 11) | func TestDelimiterRegex(t *testing.T) {
function TestDelimiterRegexString (line 48) | func TestDelimiterRegexString(t *testing.T) {
function TestDelimiterRegexRegex (line 61) | func TestDelimiterRegexRegex(t *testing.T) {
function TestDelimiterRegexRegexCaret (line 72) | func TestDelimiterRegexRegexCaret(t *testing.T) {
function TestSplitNth (line 85) | func TestSplitNth(t *testing.T) {
function TestIrrelevantNth (line 112) | func TestIrrelevantNth(t *testing.T) {
function TestParseKeys (line 144) | func TestParseKeys(t *testing.T) {
function TestParseKeysWithComma (line 202) | func TestParseKeysWithComma(t *testing.T) {
function TestBind (line 252) | func TestBind(t *testing.T) {
function TestColorSpec (line 302) | func TestColorSpec(t *testing.T) {
function TestDefaultCtrlNP (line 349) | func TestDefaultCtrlNP(t *testing.T) {
function optsFor (line 379) | func optsFor(words ...string) *Options {
function TestToggle (line 387) | func TestToggle(t *testing.T) {
function TestPreviewOpts (line 404) | func TestPreviewOpts(t *testing.T) {
function TestPreviewWrapSign (line 467) | func TestPreviewWrapSign(t *testing.T) {
function TestAdditiveExpect (line 511) | func TestAdditiveExpect(t *testing.T) {
function TestValidateSign (line 518) | func TestValidateSign(t *testing.T) {
function TestParseSingleActionList (line 541) | func TestParseSingleActionList(t *testing.T) {
function TestParseSingleActionListError (line 557) | func TestParseSingleActionListError(t *testing.T) {
function TestMaskActionContents (line 564) | func TestMaskActionContents(t *testing.T) {
FILE: src/pattern.go
type termType (line 21) | type termType
constant termFuzzy (line 24) | termFuzzy termType = iota
constant termExact (line 25) | termExact
constant termExactBoundary (line 26) | termExactBoundary
constant termPrefix (line 27) | termPrefix
constant termSuffix (line 28) | termSuffix
constant termEqual (line 29) | termEqual
type term (line 32) | type term struct
method String (line 41) | func (t term) String() string {
type termSet (line 45) | type termSet
type Pattern (line 48) | type Pattern struct
method IsEmpty (line 252) | func (p *Pattern) IsEmpty() bool {
method AsString (line 263) | func (p *Pattern) AsString() string {
method buildCacheKey (line 267) | func (p *Pattern) buildCacheKey() string {
method buildDirectAlgo (line 283) | func (p *Pattern) buildDirectAlgo(fuzzyAlgo algo.Algo) (algo.Algo, *te...
method CacheKey (line 297) | func (p *Pattern) CacheKey() string {
method Match (line 302) | func (p *Pattern) Match(chunk *Chunk, slab *util.Slab) []Result {
method matchChunk (line 322) | func (p *Pattern) matchChunk(chunk *Chunk, cachedBitmap *ChunkBitmap, ...
method MatchItem (line 388) | func (p *Pattern) MatchItem(item *Item, withPos bool, slab *util.Slab)...
method basicMatch (line 403) | func (p *Pattern) basicMatch(item *Item, withPos bool, slab *util.Slab...
method extendedMatch (line 416) | func (p *Pattern) extendedMatch(item *Item, withPos bool, slab *util.S...
method transformInput (line 466) | func (p *Pattern) transformInput(item *Item) []Token {
method iter (line 487) | func (p *Pattern) iter(pfun algo.Algo, tokens []Token, caseSensitive b...
function init (line 74) | func init() {
function BuildPattern (line 79) | func BuildPattern(cache *ChunkCache, patternCache map[string]*Pattern, f...
function parseTerms (line 168) | func parseTerms(fuzzy bool, caseMode Case, normalize bool, str string) [...
FILE: src/pattern_test.go
function init (line 14) | func init() {
function TestParseTermsExtended (line 18) | func TestParseTermsExtended(t *testing.T) {
function TestParseTermsExtendedExact (line 45) | func TestParseTermsExtendedExact(t *testing.T) {
function TestParseTermsEmpty (line 61) | func TestParseTermsEmpty(t *testing.T) {
function buildPattern (line 68) | func buildPattern(fuzzy bool, fuzzyAlgo algo.Algo, extended bool, caseMo...
function TestExact (line 75) | func TestExact(t *testing.T) {
function TestEqual (line 89) | func TestEqual(t *testing.T) {
function TestCaseSensitivity (line 110) | func TestCaseSensitivity(t *testing.T) {
function TestOrigTextAndTransformed (line 128) | func TestOrigTextAndTransformed(t *testing.T) {
function TestCacheKey (line 161) | func TestCacheKey(t *testing.T) {
function TestCacheable (line 183) | func TestCacheable(t *testing.T) {
function buildChunks (line 204) | func buildChunks(numChunks int) []*Chunk {
function buildPatternWith (line 229) | func buildPatternWith(cache *ChunkCache, runes []rune) *Pattern {
function TestBitmapCacheBenefit (line 235) | func TestBitmapCacheBenefit(t *testing.T) {
function BenchmarkWithCache (line 290) | func BenchmarkWithCache(b *testing.B) {
FILE: src/protector/protector.go
function Protect (line 6) | func Protect() {}
FILE: src/protector/protector_openbsd.go
function Protect (line 8) | func Protect() {
FILE: src/proxy.go
constant becomeSuffix (line 20) | becomeSuffix = ".become"
function escapeSingleQuote (line 22) | func escapeSingleQuote(str string) string {
function fifo (line 26) | func fifo(name string) (string, error) {
function runProxy (line 36) | func runProxy(commandPrefix string, cmdBuilder func(temp string, needBas...
FILE: src/proxy_unix.go
function sh (line 12) | func sh(bash bool) (string, error) {
function mkfifo (line 19) | func mkfifo(path string, mode uint32) (string, error) {
function withOutputPipe (line 23) | func withOutputPipe(output string, task func(io.ReadCloser)) error {
function withInputPipe (line 33) | func withInputPipe(input string, task func(io.WriteCloser)) error {
FILE: src/proxy_windows.go
function sh (line 16) | func sh(bash bool) (string, error) {
function mkfifo (line 36) | func mkfifo(path string, mode uint32) (string, error) {
function withOutputPipe (line 49) | func withOutputPipe(output string, task func(io.ReadCloser)) error {
function withInputPipe (line 68) | func withInputPipe(input string, task func(io.WriteCloser)) error {
FILE: src/reader.go
type Reader (line 21) | type Reader struct
method startEventPoller (line 51) | func (r *Reader) startEventPoller() {
method fin (line 75) | func (r *Reader) fin(success bool) {
method terminate (line 91) | func (r *Reader) terminate() {
method restart (line 101) | func (r *Reader) restart(command commandSpec, environ []string, readyC...
method readChannel (line 111) | func (r *Reader) readChannel(inputChan chan string) bool {
method ReadSource (line 125) | func (r *Reader) ReadSource(inputChan chan string, roots []string, opt...
method feed (line 153) | func (r *Reader) feed(src io.Reader) {
method readFromStdin (line 241) | func (r *Reader) readFromStdin() bool {
method readFiles (line 270) | func (r *Reader) readFiles(roots []string, opts walkerOpts, ignores []...
method readFromCommand (line 385) | func (r *Reader) readFromCommand(command string, environ []string, sig...
function NewReader (line 36) | func NewReader(pusher func([]byte) bool, eventBox *util.EventBox, execut...
function isSymlinkToDir (line 246) | func isSymlinkToDir(path string, de os.DirEntry) bool {
function trimPath (line 256) | func trimPath(path string) string {
FILE: src/reader_test.go
function TestReadFromCommand (line 10) | func TestReadFromCommand(t *testing.T) {
FILE: src/result.go
type Offset (line 13) | type Offset
type colorOffset (line 15) | type colorOffset struct
method IsFullBgMarker (line 22) | func (co colorOffset) IsFullBgMarker(at int32) bool {
type Result (line 26) | type Result struct
method Index (line 123) | func (result *Result) Index() int32 {
method colorOffsets (line 131) | func (result *Result) colorOffsets(matchOffsets []Offset, nthOffsets [...
function buildResult (line 31) | func buildResult(item *Item, offsets []Offset, score int) Result {
function buildResultFromBounds (line 54) | func buildResultFromBounds(item *Item, score int, minBegin, minEnd, maxE...
function minRank (line 127) | func minRank() Result {
type ByOrder (line 301) | type ByOrder
method Len (line 303) | func (a ByOrder) Len() int {
method Swap (line 307) | func (a ByOrder) Swap(i, j int) {
method Less (line 311) | func (a ByOrder) Less(i, j int) bool {
type ByRelevance (line 318) | type ByRelevance
method Len (line 320) | func (a ByRelevance) Len() int {
method Swap (line 324) | func (a ByRelevance) Swap(i, j int) {
method Less (line 328) | func (a ByRelevance) Less(i, j int) bool {
type ByRelevanceTac (line 333) | type ByRelevanceTac
method Len (line 335) | func (a ByRelevanceTac) Len() int {
method Swap (line 339) | func (a ByRelevanceTac) Swap(i, j int) {
method Less (line 343) | func (a ByRelevanceTac) Less(i, j int) bool {
function radixSortResults (line 351) | func radixSortResults(a []Result, tac bool, scratch []Result) []Result {
FILE: src/result_others.go
function compareRanks (line 5) | func compareRanks(irank Result, jrank Result, tac bool) bool {
function sortKey (line 18) | func sortKey(r *Result) uint64 {
FILE: src/result_test.go
function withIndex (line 13) | func withIndex(i *Item, index int) *Item {
function TestOffsetSort (line 18) | func TestOffsetSort(t *testing.T) {
function TestRankComparison (line 32) | func TestRankComparison(t *testing.T) {
function TestResultRank (line 54) | func TestResultRank(t *testing.T) {
function TestChunkTiebreak (line 102) | func TestChunkTiebreak(t *testing.T) {
function TestColorOffset (line 119) | func TestColorOffset(t *testing.T) {
function TestRadixSortResults (line 218) | func TestRadixSortResults(t *testing.T) {
FILE: src/result_x86.go
function compareRanks (line 7) | func compareRanks(irank Result, jrank Result, tac bool) bool {
function sortKey (line 18) | func sortKey(r *Result) uint64 {
FILE: src/server.go
function init (line 19) | func init() {
type getParams (line 23) | type getParams struct
constant crlf (line 29) | crlf = "\r\n"
constant httpOk (line 30) | httpOk = "HTTP/1.1 200 OK" + crlf
constant httpBadRequest (line 31) | httpBadRequest = "HTTP/1.1 400 Bad Request" + crlf
constant httpUnauthorized (line 32) | httpUnauthorized = "HTTP/1.1 401 Unauthorized" + crlf
constant httpUnavailable (line 33) | httpUnavailable = "HTTP/1.1 503 Service Unavailable" + crlf
constant httpReadTimeout (line 34) | httpReadTimeout = 10 * time.Second
constant channelTimeout (line 35) | channelTimeout = 2 * time.Second
constant jsonContentType (line 36) | jsonContentType = "Content-Type: application/json" + crlf
constant maxContentLength (line 37) | maxContentLength = 1024 * 1024
type httpServer (line 40) | type httpServer struct
method handleHttpRequest (line 154) | func (server *httpServer) handleHttpRequest(conn net.Conn) string {
type listenAddress (line 46) | type listenAddress struct
method IsLocal (line 52) | func (addr listenAddress) IsLocal() bool {
function parseListenAddress (line 58) | func parseListenAddress(address string) (listenAddress, error) {
function startHttpServer (line 81) | func startHttpServer(address listenAddress, actionChannel chan []*action...
function parseGetParams (line 259) | func parseGetParams(query string) getParams {
FILE: src/terminal.go
constant clearCode (line 61) | clearCode string = "\x1b[2J"
constant maxFocusEvents (line 64) | maxFocusEvents = 10000
constant blockDuration (line 68) | blockDuration = 1 * time.Second
function init (line 70) | func init() {
type jumpMode (line 92) | type jumpMode
constant jumpDisabled (line 95) | jumpDisabled jumpMode = iota
constant jumpEnabled (line 96) | jumpEnabled
constant jumpAcceptEnabled (line 97) | jumpAcceptEnabled
type resumableState (line 100) | type resumableState
method Enabled (line 108) | func (s resumableState) Enabled() bool {
method Force (line 112) | func (s *resumableState) Force(flag bool) {
method Set (line 120) | func (s *resumableState) Set(flag bool) {
constant disabledState (line 103) | disabledState resumableState = iota
constant pausedState (line 104) | pausedState
constant enabledState (line 105) | enabledState
type commandSpec (line 132) | type commandSpec struct
type quitSignal (line 137) | type quitSignal struct
type previewer (line 142) | type previewer struct
type previewed (line 154) | type previewed struct
type eachLine (line 164) | type eachLine struct
type itemLine (line 169) | type itemLine struct
type fitpad (line 202) | type fitpad struct
type labelPrinter (line 207) | type labelPrinter
type markerClass (line 209) | type markerClass
constant markerSingle (line 212) | markerSingle markerClass = iota
constant markerTop (line 213) | markerTop
constant markerMiddle (line 214) | markerMiddle
constant markerBottom (line 215) | markerBottom
type StatusItem (line 218) | type StatusItem struct
type Status (line 223) | type Status struct
type versionedCallback (line 236) | type versionedCallback struct
type runningCmd (line 241) | type runningCmd struct
type Terminal (line 247) | type Terminal struct
method inListWindow (line 186) | func (t *Terminal) inListWindow() bool {
method markEmptyLine (line 190) | func (t *Terminal) markEmptyLine(line int) {
method markOtherLine (line 196) | func (t *Terminal) markOtherLine(line int) {
method deferActivation (line 1340) | func (t *Terminal) deferActivation() bool {
method environ (line 1344) | func (t *Terminal) environ() []string {
method environForPreview (line 1348) | func (t *Terminal) environForPreview() []string {
method environImpl (line 1352) | func (t *Terminal) environImpl(forPreview bool) []string {
method visibleHeaderLines (line 1456) | func (t *Terminal) visibleHeaderLines() int {
method visibleHeaderLinesInList (line 1463) | func (t *Terminal) visibleHeaderLinesInList() int {
method visibleInputLinesInList (line 1470) | func (t *Terminal) visibleInputLinesInList() int {
method extraLines (line 1481) | func (t *Terminal) extraLines() int {
method MaxFitAndPad (line 1512) | func (t *Terminal) MaxFitAndPad() (int, int) {
method ansiLabelPrinter (line 1519) | func (t *Terminal) ansiLabelPrinter(str string, color *tui.ColorPair, ...
method withWindow (line 1586) | func (t *Terminal) withWindow(w tui.Window, f func()) {
method parsePrompt (line 1595) | func (t *Terminal) parsePrompt(prompt string) (func(), int) {
method noSeparatorLine (line 1637) | func (t *Terminal) noSeparatorLine() bool {
method barCol (line 1655) | func (t *Terminal) barCol() int {
method wrapCols (line 1662) | func (t *Terminal) wrapCols() int {
method clearNumLinesCache (line 1669) | func (t *Terminal) clearNumLinesCache() {
method numItemLines (line 1674) | func (t *Terminal) numItemLines(item *Item, atMost int) (int, bool) {
method itemLines (line 1701) | func (t *Terminal) itemLines(item *Item, atMost int) ([][]rune, bool) {
method avgNumLines (line 1712) | func (t *Terminal) avgNumLines() int {
method getScrollbar (line 1734) | func (t *Terminal) getScrollbar() (int, int) {
method Input (line 1739) | func (t *Terminal) Input() (bool, []rune) {
method PauseRendering (line 1753) | func (t *Terminal) PauseRendering() {
method ResumeRendering (line 1758) | func (t *Terminal) ResumeRendering() {
method UpdateCount (line 1763) | func (t *Terminal) UpdateCount(cnt int, final bool, failedCommand *str...
method changeHeader (line 1782) | func (t *Terminal) changeHeader(header string) bool {
method changeFooter (line 1794) | func (t *Terminal) changeFooter(footer string) {
method UpdateHeader (line 1805) | func (t *Terminal) UpdateHeader(header []Item) {
method UpdateProgress (line 1819) | func (t *Terminal) UpdateProgress(progress float32) {
method UpdateList (line 1832) | func (t *Terminal) UpdateList(result MatchResult) {
method output (line 2005) | func (t *Terminal) output() bool {
method sortSelected (line 2038) | func (t *Terminal) sortSelected() []selectedItem {
method displayWidth (line 2047) | func (t *Terminal) displayWidth(runes []rune) int {
method displayWidthWithPrefix (line 2052) | func (t *Terminal) displayWidthWithPrefix(str string, prefixWidth int)...
method minPreviewSize (line 2073) | func (t *Terminal) minPreviewSize(opts *previewOpts) (int, int) {
method adjustMarginAndPadding (line 2088) | func (t *Terminal) adjustMarginAndPadding() (int, int, [4]int, [4]int) {
method forceRerenderList (line 2178) | func (t *Terminal) forceRerenderList() {
method hasHeaderWindow (line 2182) | func (t *Terminal) hasHeaderWindow() bool {
method hasHeaderLinesWindow (line 2195) | func (t *Terminal) hasHeaderLinesWindow() bool {
method determineHeaderLinesShape (line 2200) | func (t *Terminal) determineHeaderLinesShape() (bool, tui.BorderShape) {
method resizeWindows (line 2238) | func (t *Terminal) resizeWindows(forcePreview bool, redrawBorder bool) {
method printLabel (line 2788) | func (t *Terminal) printLabel(window tui.Window, render labelPrinter, ...
method move (line 2822) | func (t *Terminal) move(y int, x int, clear bool) {
method truncateQuery (line 2861) | func (t *Terminal) truncateQuery() {
method updatePromptOffset (line 2870) | func (t *Terminal) updatePromptOffset() ([]rune, []rune) {
method promptLine (line 2889) | func (t *Terminal) promptLine() int {
method placeCursor (line 2906) | func (t *Terminal) placeCursor() {
method printPrompt (line 2924) | func (t *Terminal) printPrompt() {
method trimMessage (line 2955) | func (t *Terminal) trimMessage(message string, maxWidth int) string {
method printInfo (line 2963) | func (t *Terminal) printInfo() {
method printInfoImpl (line 2970) | func (t *Terminal) printInfoImpl() {
method resizeIfNeeded (line 3179) | func (t *Terminal) resizeIfNeeded() bool {
method printHeader (line 3215) | func (t *Terminal) printHeader() {
method printFooter (line 3234) | func (t *Terminal) printFooter() {
method headerIndent (line 3269) | func (t *Terminal) headerIndent(borderShape tui.BorderShape) int {
method headerIndentImpl (line 3273) | func (t *Terminal) headerIndentImpl(base int, borderShape tui.BorderSh...
method printHeaderImpl (line 3287) | func (t *Terminal) printHeaderImpl(window tui.Window, borderShape tui....
method canSpanMultiLines (line 3352) | func (t *Terminal) canSpanMultiLines() bool {
method renderBar (line 3356) | func (t *Terminal) renderBar(line int, barRange [2]int) {
method renderEmptyLine (line 3365) | func (t *Terminal) renderEmptyLine(line int, barRange [2]int) {
method gutter (line 3371) | func (t *Terminal) gutter(current bool, alt bool) {
method renderGapLine (line 3395) | func (t *Terminal) renderGapLine(line int, barRange [2]int, drawLine b...
method printList (line 3412) | func (t *Terminal) printList() {
method printBar (line 3435) | func (t *Terminal) printBar(lineNum int, forceRedraw bool, barRange [2...
method printItem (line 3448) | func (t *Terminal) printItem(result Result, line int, maxLine int, ind...
method trimRight (line 3639) | func (t *Terminal) trimRight(runes []rune, width int) ([]rune, bool) {
method displayWidthWithLimit (line 3648) | func (t *Terminal) displayWidthWithLimit(runes []rune, prefixWidth int...
method trimLeft (line 3653) | func (t *Terminal) trimLeft(runes []rune, width int, ellipsisWidth int...
method overflow (line 3727) | func (t *Terminal) overflow(runes []rune, max int) bool {
method printHighlighted (line 3731) | func (t *Terminal) printHighlighted(result Result, colBase tui.ColorPa...
method printColoredString (line 4088) | func (t *Terminal) printColoredString(window tui.Window, text []rune, ...
method renderPreviewSpinner (line 4131) | func (t *Terminal) renderPreviewSpinner() {
method renderPreviewArea (line 4158) | func (t *Terminal) renderPreviewArea(unchanged bool) {
method makeImageBorder (line 4202) | func (t *Terminal) makeImageBorder(width int, top bool) string {
method followOffset (line 4283) | func (t *Terminal) followOffset() int {
method previewLineHeight (line 4310) | func (t *Terminal) previewLineHeight(line string, maxWidth int) int {
method ansiLineWidth (line 4349) | func (t *Terminal) ansiLineWidth(line string, prefixWidth int) int {
method wordWrapAnsiLine (line 4356) | func (t *Terminal) wordWrapAnsiLine(line string, maxWidth int, wrapSig...
method renderPreviewText (line 4425) | func (t *Terminal) renderPreviewText(height int, lines []string, lineN...
method renderPreviewScrollbar (line 4627) | func (t *Terminal) renderPreviewScrollbar(yoff int, barLength int, bar...
method printPreview (line 4665) | func (t *Terminal) printPreview() {
method printPreviewDelayed (line 4682) | func (t *Terminal) printPreviewDelayed() {
method processTabsStr (line 4696) | func (t *Terminal) processTabsStr(input string, prefixWidth int) (stri...
method processTabs (line 4716) | func (t *Terminal) processTabs(runes []rune, prefixWidth int) (string,...
method printAll (line 4720) | func (t *Terminal) printAll() {
method flush (line 4730) | func (t *Terminal) flush() {
method delChar (line 4771) | func (t *Terminal) delChar() bool {
method rubout (line 4811) | func (t *Terminal) rubout(pattern string) {
method replacePlaceholderInInitialCommand (line 4893) | func (t *Terminal) replacePlaceholderInInitialCommand(template string)...
method replacePlaceholder (line 4897) | func (t *Terminal) replacePlaceholder(template string, forcePlus bool,...
method evaluateScrollOffset (line 4912) | func (t *Terminal) evaluateScrollOffset() int {
method fullRedraw (line 5074) | func (t *Terminal) fullRedraw() {
method captureLine (line 5080) | func (t *Terminal) captureLine(template string) string {
method captureLines (line 5084) | func (t *Terminal) captureLines(template string) string {
method captureAsync (line 5088) | func (t *Terminal) captureAsync(a action, firstLineOnly bool, callback...
method dispatchAsync (line 5125) | func (t *Terminal) dispatchAsync() {
method executeCommand (line 5165) | func (t *Terminal) executeCommand(template string, forcePlus bool, bac...
method hasPreviewer (line 5271) | func (t *Terminal) hasPreviewer() bool {
method needPreviewWindow (line 5275) | func (t *Terminal) needPreviewWindow() bool {
method canPreview (line 5280) | func (t *Terminal) canPreview() bool {
method hasPreviewWindow (line 5284) | func (t *Terminal) hasPreviewWindow() bool {
method hasPreviewWindowOnRight (line 5288) | func (t *Terminal) hasPreviewWindowOnRight() bool {
method currentItem (line 5292) | func (t *Terminal) currentItem() *Item {
method isCurrentItemMatch (line 5300) | func (t *Terminal) isCurrentItemMatch() bool {
method isItemMatch (line 5312) | func (t *Terminal) isItemMatch(item *Item) bool {
method filterSelected (line 5317) | func (t *Terminal) filterSelected() {
method buildPlusList (line 5327) | func (t *Terminal) buildPlusList(template string, forcePlus bool) (boo...
method selectItem (line 5367) | func (t *Terminal) selectItem(item *Item) bool {
method selectItemChanged (line 5381) | func (t *Terminal) selectItemChanged(item *Item) bool {
method deselectItem (line 5388) | func (t *Terminal) deselectItem(item *Item) {
method deselectItemChanged (line 5393) | func (t *Terminal) deselectItemChanged(item *Item) bool {
method toggleItem (line 5401) | func (t *Terminal) toggleItem(item *Item) bool {
method killPreview (line 5409) | func (t *Terminal) killPreview() {
method cancelPreview (line 5417) | func (t *Terminal) cancelPreview() {
method pwindowSize (line 5424) | func (t *Terminal) pwindowSize() tui.TermSize {
method currentIndex (line 5437) | func (t *Terminal) currentIndex() int32 {
method trackKeyFor (line 5444) | func (t *Terminal) trackKeyFor(item *Item, nth []Range) string {
method unblockTrack (line 5449) | func (t *Terminal) unblockTrack() {
method addClickHeaderWord (line 5460) | func (t *Terminal) addClickHeaderWord(env []string) []string {
method addClickFooterWord (line 5546) | func (t *Terminal) addClickFooterWord(env []string) []string {
method Loop (line 5578) | func (t *Terminal) Loop() error {
method constrain (line 7720) | func (t *Terminal) constrain() {
method vmove (line 7823) | func (t *Terminal) vmove(o int, allowCycle bool) bool {
method vset (line 7843) | func (t *Terminal) vset(o int) bool {
method promptLines (line 7849) | func (t *Terminal) promptLines() int {
method maxItems (line 7863) | func (t *Terminal) maxItems() int {
method dumpItem (line 7868) | func (t *Terminal) dumpItem(i *Item) StatusItem {
method tryLock (line 7878) | func (t *Terminal) tryLock(timeout time.Duration) bool {
method dumpStatus (line 7895) | func (t *Terminal) dumpStatus(params getParams) string {
type numLinesCacheValue (line 459) | type numLinesCacheValue struct
type selectedItem (line 464) | type selectedItem struct
type byTimeOrder (line 469) | type byTimeOrder
method Len (line 471) | func (a byTimeOrder) Len() int {
method Swap (line 475) | func (a byTimeOrder) Swap(i, j int) {
method Less (line 479) | func (a byTimeOrder) Less(i, j int) bool {
constant reqResize (line 485) | reqResize util.EventType = iota
constant reqReinit (line 486) | reqReinit
constant reqFullRedraw (line 487) | reqFullRedraw
constant reqRedraw (line 488) | reqRedraw
constant reqJump (line 490) | reqJump
constant reqPrompt (line 491) | reqPrompt
constant reqInfo (line 492) | reqInfo
constant reqHeader (line 493) | reqHeader
constant reqFooter (line 494) | reqFooter
constant reqList (line 495) | reqList
constant reqRedrawInputLabel (line 496) | reqRedrawInputLabel
constant reqRedrawHeaderLabel (line 497) | reqRedrawHeaderLabel
constant reqRedrawFooterLabel (line 498) | reqRedrawFooterLabel
constant reqRedrawListLabel (line 499) | reqRedrawListLabel
constant reqRedrawBorderLabel (line 500) | reqRedrawBorderLabel
constant reqRedrawPreviewLabel (line 501) | reqRedrawPreviewLabel
constant reqPreviewReady (line 503) | reqPreviewReady
constant reqPreviewEnqueue (line 504) | reqPreviewEnqueue
constant reqPreviewDisplay (line 505) | reqPreviewDisplay
constant reqPreviewRefresh (line 506) | reqPreviewRefresh
constant reqPreviewDelayed (line 507) | reqPreviewDelayed
constant reqActivate (line 509) | reqActivate
constant reqClose (line 510) | reqClose
constant reqPrintQuery (line 511) | reqPrintQuery
constant reqBecome (line 512) | reqBecome
constant reqQuit (line 513) | reqQuit
constant reqFatal (line 514) | reqFatal
function isTerminalEvent (line 517) | func isTerminalEvent(et util.EventType) bool {
type action (line 525) | type action struct
type actionType (line 531) | type actionType
method Name (line 721) | func (a actionType) Name() string {
constant actIgnore (line 534) | actIgnore actionType = iota
constant actStart (line 535) | actStart
constant actClick (line 536) | actClick
constant actInvalid (line 537) | actInvalid
constant actBracketedPasteBegin (line 538) | actBracketedPasteBegin
constant actBracketedPasteEnd (line 539) | actBracketedPasteEnd
constant actChar (line 540) | actChar
constant actMouse (line 541) | actMouse
constant actBeginningOfLine (line 542) | actBeginningOfLine
constant actAbort (line 543) | actAbort
constant actAccept (line 544) | actAccept
constant actAcceptNonEmpty (line 545) | actAcceptNonEmpty
constant actAcceptOrPrintQuery (line 546) | actAcceptOrPrintQuery
constant actBackwardChar (line 547) | actBackwardChar
constant actBackwardDeleteChar (line 548) | actBackwardDeleteChar
constant actBackwardDeleteCharEof (line 549) | actBackwardDeleteCharEof
constant actBackwardWord (line 550) | actBackwardWord
constant actBackwardSubWord (line 551) | actBackwardSubWord
constant actCancel (line 552) | actCancel
constant actChangeBorderLabel (line 554) | actChangeBorderLabel
constant actChangeGhost (line 555) | actChangeGhost
constant actChangeHeader (line 556) | actChangeHeader
constant actChangeHeaderLines (line 557) | actChangeHeaderLines
constant actChangeFooter (line 558) | actChangeFooter
constant actChangeHeaderLabel (line 559) | actChangeHeaderLabel
constant actChangeFooterLabel (line 560) | actChangeFooterLabel
constant actChangeInputLabel (line 561) | actChangeInputLabel
constant actChangeListLabel (line 562) | actChangeListLabel
constant actChangeMulti (line 563) | actChangeMulti
constant actChangeNth (line 564) | actChangeNth
constant actChangeWithNth (line 565) | actChangeWithNth
constant actChangePointer (line 566) | actChangePointer
constant actChangePreview (line 567) | actChangePreview
constant actChangePreviewLabel (line 568) | actChangePreviewLabel
constant actChangePreviewWindow (line 569) | actChangePreviewWindow
constant actChangePrompt (line 570) | actChangePrompt
constant actChangeQuery (line 571) | actChangeQuery
constant actClearScreen (line 573) | actClearScreen
constant actClearQuery (line 574) | actClearQuery
constant actClearSelection (line 575) | actClearSelection
constant actClose (line 576) | actClose
constant actDeleteChar (line 577) | actDeleteChar
constant actDeleteCharEof (line 578) | actDeleteCharEof
constant actEndOfLine (line 579) | actEndOfLine
constant actFatal (line 580) | actFatal
constant actForwardChar (line 581) | actForwardChar
constant actForwardWord (line 582) | actForwardWord
constant actForwardSubWord (line 583) | actForwardSubWord
constant actKillLine (line 584) | actKillLine
constant actKillWord (line 585) | actKillWord
constant actKillSubWord (line 586) | actKillSubWord
constant actUnixLineDiscard (line 587) | actUnixLineDiscard
constant actUnixWordRubout (line 588) | actUnixWordRubout
constant actYank (line 589) | actYank
constant actBackwardKillWord (line 590) | actBackwardKillWord
constant actBackwardKillSubWord (line 591) | actBackwardKillSubWord
constant actSelectAll (line 592) | actSelectAll
constant actDeselectAll (line 593) | actDeselectAll
constant actToggle (line 594) | actToggle
constant actToggleSearch (line 595) | actToggleSearch
constant actToggleAll (line 596) | actToggleAll
constant actToggleDown (line 597) | actToggleDown
constant actToggleUp (line 598) | actToggleUp
constant actToggleIn (line 599) | actToggleIn
constant actToggleOut (line 600) | actToggleOut
constant actToggleTrack (line 601) | actToggleTrack
constant actToggleTrackCurrent (line 602) | actToggleTrackCurrent
constant actToggleHeader (line 603) | actToggleHeader
constant actToggleWrap (line 604) | actToggleWrap
constant actToggleWrapWord (line 605) | actToggleWrapWord
constant actToggleMultiLine (line 606) | actToggleMultiLine
constant actToggleHscroll (line 607) | actToggleHscroll
constant actToggleRaw (line 608) | actToggleRaw
constant actEnableRaw (line 609) | actEnableRaw
constant actDisableRaw (line 610) | actDisableRaw
constant actTrackCurrent (line 611) | actTrackCurrent
constant actToggleInput (line 612) | actToggleInput
constant actHideInput (line 613) | actHideInput
constant actShowInput (line 614) | actShowInput
constant actUntrackCurrent (line 615) | actUntrackCurrent
constant actDown (line 616) | actDown
constant actDownMatch (line 617) | actDownMatch
constant actUp (line 618) | actUp
constant actUpMatch (line 619) | actUpMatch
constant actPageUp (line 620) | actPageUp
constant actPageDown (line 621) | actPageDown
constant actPosition (line 622) | actPosition
constant actHalfPageUp (line 623) | actHalfPageUp
constant actHalfPageDown (line 624) | actHalfPageDown
constant actOffsetUp (line 625) | actOffsetUp
constant actOffsetDown (line 626) | actOffsetDown
constant actOffsetMiddle (line 627) | actOffsetMiddle
constant actJump (line 628) | actJump
constant actJumpAccept (line 629) | actJumpAccept
constant actPrintQuery (line 630) | actPrintQuery
constant actRefreshPreview (line 631) | actRefreshPreview
constant actReplaceQuery (line 632) | actReplaceQuery
constant actToggleSort (line 633) | actToggleSort
constant actShowPreview (line 634) | actShowPreview
constant actHidePreview (line 635) | actHidePreview
constant actTogglePreview (line 636) | actTogglePreview
constant actTogglePreviewWrap (line 637) | actTogglePreviewWrap
constant actTogglePreviewWrapWord (line 638) | actTogglePreviewWrapWord
constant actTransform (line 640) | actTransform
constant actTransformBorderLabel (line 641) | actTransformBorderLabel
constant actTransformGhost (line 642) | actTransformGhost
constant actTransformHeader (line 643) | actTransformHeader
constant actTransformHeaderLines (line 644) | actTransformHeaderLines
constant actTransformFooter (line 645) | actTransformFooter
constant actTransformHeaderLabel (line 646) | actTransformHeaderLabel
constant actTransformFooterLabel (line 647) | actTransformFooterLabel
constant actTransformInputLabel (line 648) | actTransformInputLabel
constant actTransformListLabel (line 649) | actTransformListLabel
constant actTransformNth (line 650) | actTransformNth
constant actTransformWithNth (line 651) | actTransformWithNth
constant actTransformPointer (line 652) | actTransformPointer
constant actTransformPreviewLabel (line 653) | actTransformPreviewLabel
constant actTransformPrompt (line 654) | actTransformPrompt
constant actTransformQuery (line 655) | actTransformQuery
constant actTransformSearch (line 656) | actTransformSearch
constant actTrigger (line 658) | actTrigger
constant actBgTransform (line 660) | actBgTransform
constant actBgTransformBorderLabel (line 661) | actBgTransformBorderLabel
constant actBgTransformGhost (line 662) | actBgTransformGhost
constant actBgTransformHeader (line 663) | actBgTransformHeader
constant actBgTransformHeaderLines (line 664) | actBgTransformHeaderLines
constant actBgTransformFooter (line 665) | actBgTransformFooter
constant actBgTransformHeaderLabel (line 666) | actBgTransformHeaderLabel
constant actBgTransformFooterLabel (line 667) | actBgTransformFooterLabel
constant actBgTransformInputLabel (line 668) | actBgTransformInputLabel
constant actBgTransformListLabel (line 669) | actBgTransformListLabel
constant actBgTransformNth (line 670) | actBgTransformNth
constant actBgTransformWithNth (line 671) | actBgTransformWithNth
constant actBgTransformPointer (line 672) | actBgTransformPointer
constant actBgTransformPreviewLabel (line 673) | actBgTransformPreviewLabel
constant actBgTransformPrompt (line 674) | actBgTransformPrompt
constant actBgTransformQuery (line 675) | actBgTransformQuery
constant actBgTransformSearch (line 676) | actBgTransformSearch
constant actBgCancel (line 678) | actBgCancel
constant actSearch (line 680) | actSearch
constant actPreview (line 681) | actPreview
constant actPreviewTop (line 682) | actPreviewTop
constant actPreviewBottom (line 683) | actPreviewBottom
constant actPreviewUp (line 684) | actPreviewUp
constant actPreviewDown (line 685) | actPreviewDown
constant actPreviewPageUp (line 686) | actPreviewPageUp
constant actPreviewPageDown (line 687) | actPreviewPageDown
constant actPreviewHalfPageUp (line 688) | actPreviewHalfPageUp
constant actPreviewHalfPageDown (line 689) | actPreviewHalfPageDown
constant actPrevHistory (line 690) | actPrevHistory
constant actPrevSelected (line 691) | actPrevSelected
constant actPrint (line 692) | actPrint
constant actPut (line 693) | actPut
constant actNextHistory (line 694) | actNextHistory
constant actNextSelected (line 695) | actNextSelected
constant actExecute (line 696) | actExecute
constant actExecuteSilent (line 697) | actExecuteSilent
constant actExecuteMulti (line 698) | actExecuteMulti
constant actSigStop (line 699) | actSigStop
constant actBest (line 700) | actBest
constant actFirst (line 701) | actFirst
constant actLast (line 702) | actLast
constant actReload (line 703) | actReload
constant actReloadSync (line 704) | actReloadSync
constant actDisableSearch (line 705) | actDisableSearch
constant actEnableSearch (line 706) | actEnableSearch
constant actSelect (line 707) | actSelect
constant actDeselect (line 708) | actDeselect
constant actUnbind (line 709) | actUnbind
constant actRebind (line 710) | actRebind
constant actToggleBind (line 711) | actToggleBind
constant actBecome (line 712) | actBecome
constant actShowHeader (line 713) | actShowHeader
constant actHideHeader (line 714) | actHideHeader
constant actBell (line 715) | actBell
constant actExclude (line 716) | actExclude
constant actExcludeMulti (line 717) | actExcludeMulti
constant actAsync (line 718) | actAsync
function processExecution (line 725) | func processExecution(action actionType) bool {
type placeholderFlags (line 775) | type placeholderFlags struct
type withNthSpec (line 785) | type withNthSpec struct
type searchRequest (line 789) | type searchRequest struct
type previewRequest (line 802) | type previewRequest struct
type previewResult (line 810) | type previewResult struct
function toActions (line 817) | func toActions(types ...actionType) []*action {
function defaultKeymap (line 825) | func defaultKeymap() map[tui.Event][]*action {
function trimQuery (line 905) | func trimQuery(query string) []rune {
function mayTriggerPreview (line 909) | func mayTriggerPreview(opts *Options) bool {
function makeSpinner (line 924) | func makeSpinner(unicode bool) []string {
function evaluateHeight (line 931) | func evaluateHeight(opts *Options, termHeight int) int {
function NewTerminal (line 946) | func NewTerminal(opts *Options, eventBox *util.EventBox, executor *util....
function borderLines (line 1434) | func borderLines(shape tui.BorderShape) int {
function borderColumns (line 1445) | func borderColumns(shape tui.BorderShape, borderWidth int) int {
function getScrollbar (line 1641) | func getScrollbar(perLine int, total int, height int, offset int) (int, ...
constant minWidth (line 2058) | minWidth = 4
constant minHeight (line 2059) | minHeight = 3
function calculateSize (line 2062) | func calculateSize(base int, size sizeSpec, occupied int, minSize int) i...
function findPassThrough (line 4220) | func findPassThrough(line string) []int {
function extractPassThroughs (line 4262) | func extractPassThroughs(line string) ([]string, string) {
function findLastMatch (line 4779) | func findLastMatch(pattern string, str string) int {
function findFirstMatch (line 4792) | func findFirstMatch(pattern string, str string) int {
function copySlice (line 4805) | func copySlice(slice []rune) []rune {
function keyMatch (line 4819) | func keyMatch(key tui.Event, event tui.Event) bool {
function parsePlaceholder (line 4824) | func parsePlaceholder(match string) (bool, string, placeholderFlags) {
function hasPreviewFlags (line 4866) | func hasPreviewFlags(template string) (slot bool, plus bool, asterisk bo...
type replacePlaceholderParams (line 4880) | type replacePlaceholderParams struct
function replacePlaceholder (line 4952) | func replacePlaceholder(params replacePlaceholderParams) (string, []stri...
FILE: src/terminal_test.go
function replacePlaceholderTest (line 15) | func replacePlaceholderTest(template string, stripAnsi bool, delimiter D...
function TestReplacePlaceholder (line 31) | func TestReplacePlaceholder(t *testing.T) {
function TestQuoteEntry (line 253) | func TestQuoteEntry(t *testing.T) {
function TestUnixCommands (line 302) | func TestUnixCommands(t *testing.T) {
function TestWindowsCommands (line 331) | func TestWindowsCommands(t *testing.T) {
function TestPowershellCommands (line 369) | func TestPowershellCommands(t *testing.T) {
function TestParsePlaceholder (line 459) | func TestParsePlaceholder(t *testing.T) {
function TestExtractPassthroughs (line 524) | func TestExtractPassthroughs(t *testing.T) {
function newItem (line 555) | func newItem(str string) *Item {
function newItems (line 563) | func newItems(str ...string) [3][]*Item {
method String (line 572) | func (item *Item) String() string {
function templateToString (line 577) | func templateToString(format string, data any) string {
type give (line 589) | type give struct
type want (line 594) | type want struct
type testCase (line 614) | type testCase struct
function testCommands (line 619) | func testCommands(t *testing.T, tests []testCase) {
method encodePlaceholder (line 657) | func (flags placeholderFlags) encodePlaceholder() string {
function readFile (line 678) | func readFile(path string) ([]byte, error) {
function TestWordWrapAnsiLine (line 703) | func TestWordWrapAnsiLine(t *testing.T) {
FILE: src/terminal_unix.go
function notifyOnResize (line 13) | func notifyOnResize(resizeChan chan<- os.Signal) {
function notifyStop (line 17) | func notifyStop(p *os.Process) {
FILE: src/terminal_windows.go
function notifyOnResize (line 9) | func notifyOnResize(resizeChan chan<- os.Signal) {
function notifyStop (line 13) | func notifyStop(p *os.Process) {
FILE: src/tmux.go
function runTmux (line 10) | func runTmux(args []string, opts *Options) (int, error) {
FILE: src/tokenizer.go
constant rangeEllipsis (line 14) | rangeEllipsis = 0
type Range (line 17) | type Range struct
method IsFull (line 22) | func (r Range) IsFull() bool {
function compareRanges (line 26) | func compareRanges(r1 []Range, r2 []Range) bool {
function RangesToString (line 38) | func RangesToString(ranges []Range) string {
type Token (line 65) | type Token struct
method String (line 71) | func (t Token) String() string {
type Delimiter (line 76) | type Delimiter struct
method IsAwk (line 82) | func (d Delimiter) IsAwk() bool {
method String (line 87) | func (d Delimiter) String() string {
function newRange (line 91) | func newRange(begin int, end int) Range {
function ParseRange (line 102) | func ParseRange(str *string) (Range, bool) {
function withPrefixLengths (line 137) | func withPrefixLengths(tokens []string, begin int) []Token {
constant awkNil (line 150) | awkNil = iota
constant awkBlack (line 151) | awkBlack
constant awkWhite (line 152) | awkWhite
function awkTokenizer (line 155) | func awkTokenizer(input string) ([]string, int) {
function Tokenize (line 193) | func Tokenize(text string, delimiter Delimiter) []Token {
function StripLastDelimiter (line 222) | func StripLastDelimiter(str string, delimiter Delimiter) string {
function GetLastDelimiter (line 239) | func GetLastDelimiter(str string, delimiter Delimiter) string {
function JoinTokens (line 257) | func JoinTokens(tokens []Token) string {
function Transform (line 266) | func Transform(tokens []Token, withNth []Range) []Token {
FILE: src/tokenizer_test.go
function TestParseRange (line 7) | func TestParseRange(t *testing.T) {
function TestTokenize (line 57) | func TestTokenize(t *testing.T) {
function TestTransform (line 81) | func TestTransform(t *testing.T) {
function TestTransformIndexOutOfBounds (line 122) | func TestTransformIndexOutOfBounds(t *testing.T) {
FILE: src/tui/dummy.go
constant Bold (line 6) | Bold = Attr(1)
constant Dim (line 7) | Dim = Attr(1 << 1)
constant Italic (line 8) | Italic = Attr(1 << 2)
constant Underline (line 9) | Underline = Attr(1 << 3)
constant Blink (line 10) | Blink = Attr(1 << 4)
constant Blink2 (line 11) | Blink2 = Attr(1 << 5)
constant Reverse (line 12) | Reverse = Attr(1 << 6)
constant StrikeThrough (line 13) | StrikeThrough = Attr(1 << 7)
function HasFullscreenRenderer (line 16) | func HasFullscreenRenderer() bool {
method Init (line 22) | func (r *FullscreenRenderer) Init() error { retur...
method DefaultTheme (line 23) | func (r *FullscreenRenderer) DefaultTheme() *ColorTheme { retur...
method Resize (line 24) | func (r *FullscreenRenderer) Resize(maxHeightFunc func(int) int) {}
method Pause (line 25) | func (r *FullscreenRenderer) Pause(bool) {}
method Resume (line 26) | func (r *FullscreenRenderer) Resume(bool, bool) {}
method PassThrough (line 27) | func (r *FullscreenRenderer) PassThrough(string) {}
method Clear (line 28) | func (r *FullscreenRenderer) Clear() {}
method NeedScrollbarRedraw (line 29) | func (r *FullscreenRenderer) NeedScrollbarRedraw() bool { retur...
method ShouldEmitResizeEvent (line 30) | func (r *FullscreenRenderer) ShouldEmitResizeEvent() bool { retur...
method Bell (line 31) | func (r *FullscreenRenderer) Bell() {}
method HideCursor (line 32) | func (r *FullscreenRenderer) HideCursor() {}
method ShowCursor (line 33) | func (r *FullscreenRenderer) ShowCursor() {}
method Refresh (line 34) | func (r *FullscreenRenderer) Refresh() {}
method Close (line 35) | func (r *FullscreenRenderer) Close() {}
method Size (line 36) | func (r *FullscreenRenderer) Size() TermSize { retur...
method Top (line 37) | func (r *FullscreenRenderer) Top() int { retur...
method MaxX (line 38) | func (r *FullscreenRenderer) MaxX() int { retur...
method MaxY (line 39) | func (r *FullscreenRenderer) MaxY() int { retur...
method GetChar (line 40) | func (r *FullscreenRenderer) GetChar(bool) Event { retur...
method CancelGetChar (line 41) | func (r *FullscreenRenderer) CancelGetChar() {}
method RefreshWindows (line 43) | func (r *FullscreenRenderer) RefreshWindows(windows []Window) {}
method NewWindow (line 45) | func (r *FullscreenRenderer) NewWindow(top int, left int, width int, hei...
FILE: src/tui/eventtype_string.go
function _ (line 7) | func _() {
constant _EventType_name (line 168) | _EventType_name = "RuneCtrlACtrlBCtrlCCtrlDCtrlECtrlFCtrlGCtrlHTabCtrlJC...
method String (line 172) | func (i EventType) String() string {
FILE: src/tui/light.go
constant defaultWidth (line 21) | defaultWidth = 80
constant defaultHeight (line 22) | defaultHeight = 24
constant defaultEscDelay (line 24) | defaultEscDelay = 100
constant escPollInterval (line 25) | escPollInterval = 5
constant offsetPollTries (line 26) | offsetPollTries = 10
constant maxInputBuffer (line 27) | maxInputBuffer = 1024 * 1024
constant maxSelectTries (line 28) | maxSelectTries = 100
constant DefaultTtyDevice (line 31) | DefaultTtyDevice string = "/dev/tty"
constant DIM (line 48) | DIM string = "\x1b[2m"
constant CR (line 49) | CR string = DIM + "␍"
constant LF (line 50) | LF string = DIM + "␊"
type getCharResult (line 52) | type getCharResult
method ok (line 60) | func (r getCharResult) ok() bool {
constant getCharSuccess (line 55) | getCharSuccess getCharResult = iota
constant getCharError (line 56) | getCharError
constant getCharCancelled (line 57) | getCharCancelled
type LightRenderer (line 110) | type LightRenderer struct
method Bell (line 36) | func (r *LightRenderer) Bell() {
method PassThrough (line 40) | func (r *LightRenderer) PassThrough(str string) {
method stderr (line 44) | func (r *LightRenderer) stderr(str string) {
method stderrInternal (line 64) | func (r *LightRenderer) stderrInternal(str string, allowNLCR bool, res...
method csi (line 86) | func (r *LightRenderer) csi(code string) string {
method flush (line 92) | func (r *LightRenderer) flush() {
method flushRaw (line 105) | func (r *LightRenderer) flushRaw(sequence string) {
method Init (line 198) | func (r *LightRenderer) Init() error {
method Resize (line 242) | func (r *LightRenderer) Resize(maxHeightFunc func(int) int) {
method makeSpace (line 246) | func (r *LightRenderer) makeSpace() {
method move (line 251) | func (r *LightRenderer) move(y int, x int) {
method origin (line 266) | func (r *LightRenderer) origin() {
method getBytes (line 278) | func (r *LightRenderer) getBytes(cancellable bool) ([]byte, getCharRes...
method getBytesInternal (line 282) | func (r *LightRenderer) getBytesInternal(cancellable bool, buffer []by...
method GetChar (line 327) | func (r *LightRenderer) GetChar(cancellable bool) Event {
method CancelGetChar (line 398) | func (r *LightRenderer) CancelGetChar() {
method setCancel (line 407) | func (r *LightRenderer) setCancel(f func()) {
method escSequence (line 413) | func (r *LightRenderer) escSequence(sz *int) Event {
method mouseSequence (line 872) | func (r *LightRenderer) mouseSequence(sz *int) Event {
method smcup (line 944) | func (r *LightRenderer) smcup() {
method rmcup (line 949) | func (r *LightRenderer) rmcup() {
method Pause (line 954) | func (r *LightRenderer) Pause(clear bool) {
method enableModes (line 968) | func (r *LightRenderer) enableModes() {
method disableMouse (line 977) | func (r *LightRenderer) disableMouse() {
method disableModes (line 985) | func (r *LightRenderer) disableModes() {
method Resume (line 990) | func (r *LightRenderer) Resume(clear bool, sigcont bool) {
method Clear (line 1009) | func (r *LightRenderer) Clear() {
method NeedScrollbarRedraw (line 1019) | func (r *LightRenderer) NeedScrollbarRedraw() bool {
method ShouldEmitResizeEvent (line 1023) | func (r *LightRenderer) ShouldEmitResizeEvent() bool {
method RefreshWindows (line 1027) | func (r *LightRenderer) RefreshWindows(windows []Window) {
method Refresh (line 1031) | func (r *LightRenderer) Refresh() {
method Close (line 1035) | func (r *LightRenderer) Close() {
method Top (line 1059) | func (r *LightRenderer) Top() int {
method MaxX (line 1063) | func (r *LightRenderer) MaxX() int {
method MaxY (line 1067) | func (r *LightRenderer) MaxY() int {
method NewWindow (line 1074) | func (r *LightRenderer) NewWindow(top int, left int, width int, height...
method HideCursor (line 1529) | func (r *LightRenderer) HideCursor() {
method ShowCursor (line 1534) | func (r *LightRenderer) ShowCursor() {
type LightWindow (line 144) | type LightWindow struct
method DrawBorder (line 1117) | func (w *LightWindow) DrawBorder() {
method DrawHBorder (line 1121) | func (w *LightWindow) DrawHBorder() {
method drawBorder (line 1125) | func (w *LightWindow) drawBorder(onlyHorizontal bool) {
method drawBorderHorizontal (line 1156) | func (w *LightWindow) drawBorderHorizontal(top, bottom bool) {
method drawBorderVertical (line 1182) | func (w *LightWindow) drawBorderVertical(left, right bool) {
method drawBorderAround (line 1211) | func (w *LightWindow) drawBorderAround(onlyHorizontal bool) {
method csi (line 1248) | func (w *LightWindow) csi(code string) string {
method stderrInternal (line 1252) | func (w *LightWindow) stderrInternal(str string, allowNLCR bool, reset...
method Top (line 1256) | func (w *LightWindow) Top() int {
method Left (line 1260) | func (w *LightWindow) Left() int {
method Width (line 1264) | func (w *LightWindow) Width() int {
method Height (line 1268) | func (w *LightWindow) Height() int {
method Refresh (line 1272) | func (w *LightWindow) Refresh() {
method X (line 1275) | func (w *LightWindow) X() int {
method Y (line 1279) | func (w *LightWindow) Y() int {
method EncloseX (line 1283) | func (w *LightWindow) EncloseX(x int) bool {
method EncloseY (line 1287) | func (w *LightWindow) EncloseY(y int) bool {
method Enclose (line 1291) | func (w *LightWindow) Enclose(y int, x int) bool {
method Move (line 1295) | func (w *LightWindow) Move(y int, x int) {
method MoveAndClear (line 1302) | func (w *LightWindow) MoveAndClear(y int, x int) {
method csiColor (line 1390) | func (w *LightWindow) csiColor(fg Color, bg Color, ul Color, attr Attr...
method Print (line 1399) | func (w *LightWindow) Print(text string) {
method CPrint (line 1407) | func (w *LightWindow) CPrint(pair ColorPair, text string) {
method cprint2 (line 1413) | func (w *LightWindow) cprint2(fg Color, bg Color, attr Attr, text stri...
method fill (line 1421) | func (w *LightWindow) fill(str string, resetCode string) FillReturn {
method setBg (line 1465) | func (w *LightWindow) setBg() string {
method LinkBegin (line 1475) | func (w *LightWindow) LinkBegin(uri string, params string) {
method LinkEnd (line 1479) | func (w *LightWindow) LinkEnd() {
method Fill (line 1483) | func (w *LightWindow) Fill(text string) FillReturn {
method CFill (line 1489) | func (w *LightWindow) CFill(fg Color, bg Color, ul Color, attr Attr, t...
method FinishFill (line 1504) | func (w *LightWindow) FinishFill() {
method Erase (line 1513) | func (w *LightWindow) Erase() {
method EraseMaybe (line 1520) | func (w *LightWindow) EraseMaybe() bool {
method SetWrapSign (line 1524) | func (w *LightWindow) SetWrapSign(sign string, width int) {
function NewLightRenderer (line 162) | func NewLightRenderer(ttyDefault string, ttyin *os.File, theme *ColorThe...
function repeat (line 183) | func repeat(r rune, times int) string {
function atoi (line 190) | func atoi(s string, defaultValue int) int {
function getEnv (line 270) | func getEnv(name string, defaultValue int) int {
function attrCodes (line 1310) | func attrCodes(attr Attr) []string {
function colorCodes (line 1350) | func colorCodes(fg Color, bg Color) []string {
function ulColorCode (line 1374) | func ulColorCode(c Color) string {
function cleanse (line 1403) | func cleanse(str string) string {
FILE: src/tui/light_test.go
function TestLightRenderer (line 10) | func TestLightRenderer(t *testing.T) {
FILE: src/tui/light_unix.go
function IsLightRendererSupported (line 17) | func IsLightRendererSupported() bool {
method DefaultTheme (line 21) | func (r *LightRenderer) DefaultTheme() *ColorTheme {
method fd (line 32) | func (r *LightRenderer) fd() int {
method initPlatform (line 36) | func (r *LightRenderer) initPlatform() (err error) {
method closePlatform (line 41) | func (r *LightRenderer) closePlatform() {
function openTty (line 45) | func openTty(ttyDefault string, mode int) (*os.File, error) {
function openTtyIn (line 68) | func openTtyIn(ttyDefault string) (*os.File, error) {
function openTtyOut (line 72) | func openTtyOut(ttyDefault string) (*os.File, error) {
method setupTerminal (line 76) | func (r *LightRenderer) setupTerminal() {
method restoreTerminal (line 80) | func (r *LightRenderer) restoreTerminal() {
method updateTerminalSize (line 84) | func (r *LightRenderer) updateTerminalSize() {
method findOffset (line 96) | func (r *LightRenderer) findOffset() (row int, col int) {
method getch (line 117) | func (r *LightRenderer) getch(cancellable bool, nonblock bool) (int, get...
method Size (line 175) | func (r *LightRenderer) Size() TermSize {
FILE: src/tui/light_windows.go
constant timeoutInterval (line 15) | timeoutInterval = 10
function IsLightRendererSupported (line 25) | func IsLightRendererSupported() bool {
method DefaultTheme (line 43) | func (r *LightRenderer) DefaultTheme() *ColorTheme {
method initPlatform (line 51) | func (r *LightRenderer) initPlatform() error {
method closePlatform (line 74) | func (r *LightRenderer) closePlatform() {
function openTtyIn (line 79) | func openTtyIn(ttyDefault string) (*os.File, error) {
function openTtyOut (line 84) | func openTtyOut(ttyDefault string) (*os.File, error) {
method setupTerminal (line 88) | func (r *LightRenderer) setupTerminal() {
method restoreTerminal (line 116) | func (r *LightRenderer) restoreTerminal() {
method Size (line 126) | func (r *LightRenderer) Size() TermSize {
method updateTerminalSize (line 140) | func (r *LightRenderer) updateTerminalSize() {
method findOffset (line 146) | func (r *LightRenderer) findOffset() (row int, col int) {
method getch (line 154) | func (r *LightRenderer) getch(cancellable bool, nonblock bool) (int, get...
FILE: src/tui/tcell.go
function HasFullscreenRenderer (line 17) | func HasFullscreenRenderer() bool {
function asTcellColor (line 23) | func asTcellColor(color Color) tcell.Color {
method style (line 35) | func (p ColorPair) style() tcell.Style {
type TcellWindow (line 40) | type TcellWindow struct
method Top (line 60) | func (w *TcellWindow) Top() int {
method Left (line 64) | func (w *TcellWindow) Left() int {
method Width (line 68) | func (w *TcellWindow) Width() int {
method Height (line 72) | func (w *TcellWindow) Height() int {
method Refresh (line 76) | func (w *TcellWindow) Refresh() {
method FinishFill (line 87) | func (w *TcellWindow) FinishFill() {
method X (line 220) | func (w *TcellWindow) X() int {
method Y (line 224) | func (w *TcellWindow) Y() int {
method Erase (line 776) | func (w *TcellWindow) Erase() {
method EraseMaybe (line 781) | func (w *TcellWindow) EraseMaybe() bool {
method SetWrapSign (line 786) | func (w *TcellWindow) SetWrapSign(sign string, width int) {
method EncloseX (line 791) | func (w *TcellWindow) EncloseX(x int) bool {
method EncloseY (line 795) | func (w *TcellWindow) EncloseY(y int) bool {
method Enclose (line 799) | func (w *TcellWindow) Enclose(y int, x int) bool {
method Move (line 803) | func (w *TcellWindow) Move(y int, x int) {
method MoveAndClear (line 809) | func (w *TcellWindow) MoveAndClear(y int, x int) {
method Print (line 817) | func (w *TcellWindow) Print(text string) {
method withUrl (line 821) | func (w *TcellWindow) withUrl(style tcell.Style) tcell.Style {
method printString (line 846) | func (w *TcellWindow) printString(text string, pair ColorPair) {
method CPrint (line 896) | func (w *TcellWindow) CPrint(pair ColorPair, text string) {
method pairStyle (line 900) | func (w *TcellWindow) pairStyle(pair ColorPair) tcell.Style {
method renderGraphemes (line 926) | func (w *TcellWindow) renderGraphemes(text string, style tcell.Style) {
method renderWrapSign (line 945) | func (w *TcellWindow) renderWrapSign(style tcell.Style) {
method fillString (line 959) | func (w *TcellWindow) fillString(text string, pair ColorPair) FillRetu...
method Fill (line 988) | func (w *TcellWindow) Fill(str string) FillReturn {
method LinkBegin (line 992) | func (w *TcellWindow) LinkBegin(uri string, params string) {
method LinkEnd (line 997) | func (w *TcellWindow) LinkEnd() {
method CFill (line 1002) | func (w *TcellWindow) CFill(fg Color, bg Color, ul Color, a Attr, str ...
method DrawBorder (line 1012) | func (w *TcellWindow) DrawBorder() {
method DrawHBorder (line 1016) | func (w *TcellWindow) DrawHBorder() {
method drawBorder (line 1020) | func (w *TcellWindow) drawBorder(onlyHorizontal bool) {
constant Bold (line 92) | Bold Attr = Attr(tcell.AttrBold)
constant Dim (line 93) | Dim = Attr(tcell.AttrDim)
constant Blink (line 94) | Blink = Attr(tcell.AttrBlink)
constant Reverse (line 95) | Reverse = Attr(tcell.AttrReverse)
constant Underline (line 96) | Underline = Attr(tcell.AttrUnderline)
constant StrikeThrough (line 97) | StrikeThrough = Attr(tcell.AttrStrikeThrough)
constant Italic (line 98) | Italic = Attr(tcell.AttrItalic)
method Bell (line 101) | func (r *FullscreenRenderer) Bell() {
method HideCursor (line 105) | func (r *FullscreenRenderer) HideCursor() {
method ShowCursor (line 109) | func (r *FullscreenRenderer) ShowCursor() {
method PassThrough (line 113) | func (r *FullscreenRenderer) PassThrough(str string) {
method Resize (line 118) | func (r *FullscreenRenderer) Resize(maxHeightFunc func(int) int) {}
method DefaultTheme (line 120) | func (r *FullscreenRenderer) DefaultTheme() *ColorTheme {
method Style (line 144) | func (c Color) Style() tcell.Color {
method getScreen (line 162) | func (r *FullscreenRenderer) getScreen() (tcell.Screen, error) {
method initScreen (line 176) | func (r *FullscreenRenderer) initScreen() error {
method Init (line 194) | func (r *FullscreenRenderer) Init() error {
method Top (line 206) | func (r *FullscreenRenderer) Top() int {
method MaxX (line 210) | func (r *FullscreenRenderer) MaxX() int {
method MaxY (line 215) | func (r *FullscreenRenderer) MaxY() int {
method Clear (line 228) | func (r *FullscreenRenderer) Clear() {
method NeedScrollbarRedraw (line 233) | func (r *FullscreenRenderer) NeedScrollbarRedraw() bool {
method ShouldEmitResizeEvent (line 237) | func (r *FullscreenRenderer) ShouldEmitResizeEvent() bool {
method Refresh (line 241) | func (r *FullscreenRenderer) Refresh() {
method Size (line 246) | func (r *FullscreenRenderer) Size() TermSize {
method GetChar (line 251) | func (r *FullscreenRenderer) GetChar(cancellable bool) Event {
method CancelGetChar (line 708) | func (r *FullscreenRenderer) CancelGetChar() {
method Pause (line 712) | func (r *FullscreenRenderer) Pause(clear bool) {
method Resume (line 718) | func (r *FullscreenRenderer) Resume(clear bool, sigcont bool) {
method Close (line 724) | func (r *FullscreenRenderer) Close() {
method RefreshWindows (line 729) | func (r *FullscreenRenderer) RefreshWindows(windows []Window) {
method NewWindow (line 737) | func (r *FullscreenRenderer) NewWindow(top int, left int, width int, hei...
function fill (line 768) | func fill(x, y, w, h int, n ColorPair, r rune) {
function underlineStyleFromAttr (line 831) | func underlineStyleFromAttr(a Attr) tcell.UnderlineStyle {
FILE: src/tui/tcell_test.go
function assert (line 13) | func assert(t *testing.T, context string, got any, want any) bool {
function TestGetCharEventKey (line 23) | func TestGetCharEventKey(t *testing.T) {
FILE: src/tui/ttyname_unix.go
function ttyname (line 15) | func ttyname() string {
function TtyIn (line 47) | func TtyIn(ttyDefault string) (*os.File, error) {
function TtyOut (line 52) | func TtyOut(ttyDefault string) (*os.File, error) {
FILE: src/tui/ttyname_windows.go
function ttyname (line 9) | func ttyname() string {
function TtyIn (line 14) | func TtyIn(ttyDefault string) (*os.File, error) {
function TtyOut (line 19) | func TtyOut(ttyDefault string) (*os.File, error) {
FILE: src/tui/tui.go
type Attr (line 12) | type Attr
method UnderlineStyle (line 33) | func (a Attr) UnderlineStyle() Attr {
method Merge (line 37) | func (a Attr) Merge(b Attr) Attr {
constant AttrUndefined (line 15) | AttrUndefined = Attr(0)
constant AttrRegular (line 16) | AttrRegular = Attr(1 << 8)
constant AttrClear (line 17) | AttrClear = Attr(1 << 9)
constant BoldForce (line 18) | BoldForce = Attr(1 << 10)
constant FullBg (line 19) | FullBg = Attr(1 << 11)
constant Strip (line 20) | Strip = Attr(1 << 12)
constant UnderlineStyleShift (line 25) | UnderlineStyleShift = 13
constant UnderlineStyleMask (line 26) | UnderlineStyleMask = Attr(0b111 << UnderlineStyleShift)
constant UlStyleDouble (line 27) | UlStyleDouble = Attr(0b001 << UnderlineStyleShift)
constant UlStyleCurly (line 28) | UlStyleCurly = Attr(0b010 << UnderlineStyleShift)
constant UlStyleDotted (line 29) | UlStyleDotted = Attr(0b011 << UnderlineStyleShift)
constant UlStyleDashed (line 30) | UlStyleDashed = Attr(0b100 << UnderlineStyleShift)
type EventType (line 54) | type EventType
method AsEvent (line 234) | func (t EventType) AsEvent() Event {
method Int (line 238) | func (t EventType) Int() int {
method Byte (line 242) | func (t EventType) Byte() byte {
constant Rune (line 57) | Rune EventType = iota
constant CtrlA (line 59) | CtrlA
constant CtrlB (line 60) | CtrlB
constant CtrlC (line 61) | CtrlC
constant CtrlD (line 62) | CtrlD
constant CtrlE (line 63) | CtrlE
constant CtrlF (line 64) | CtrlF
constant CtrlG (line 65) | CtrlG
constant CtrlH (line 66) | CtrlH
constant Tab (line 67) | Tab
constant CtrlJ (line 68) | CtrlJ
constant CtrlK (line 69) | CtrlK
constant CtrlL (line 70) | CtrlL
constant Enter (line 71) | Enter
constant CtrlN (line 72) | CtrlN
constant CtrlO (line 73) | CtrlO
constant CtrlP (line 74) | CtrlP
constant CtrlQ (line 75) | CtrlQ
constant CtrlR (line 76) | CtrlR
constant CtrlS (line 77) | CtrlS
constant CtrlT (line 78) | CtrlT
constant CtrlU (line 79) | CtrlU
constant CtrlV (line 80) | CtrlV
constant CtrlW (line 81) | CtrlW
constant CtrlX (line 82) | CtrlX
constant CtrlY (line 83) | CtrlY
constant CtrlZ (line 84) | CtrlZ
constant Esc (line 85) | Esc
constant CtrlSpace (line 86) | CtrlSpace
constant CtrlBackSlash (line 89) | CtrlBackSlash
constant CtrlRightBracket (line 90) | CtrlRightBracket
constant CtrlCaret (line 91) | CtrlCaret
constant CtrlSlash (line 92) | CtrlSlash
constant ShiftTab (line 94) | ShiftTab
constant Backspace (line 95) | Backspace
constant Delete (line 97) | Delete
constant PageUp (line 98) | PageUp
constant PageDown (line 99) | PageDown
constant Up (line 101) | Up
constant Down (line 102) | Down
constant Left (line 103) | Left
constant Right (line 104) | Right
constant Home (line 105) | Home
constant End (line 106) | End
constant Insert (line 107) | Insert
constant ShiftUp (line 109) | ShiftUp
constant ShiftDown (line 110) | ShiftDown
constant ShiftLeft (line 111) | ShiftLeft
constant ShiftRight (line 112) | ShiftRight
constant ShiftDelete (line 113) | ShiftDelete
constant ShiftHome (line 114) | ShiftHome
constant ShiftEnd (line 115) | ShiftEnd
constant ShiftPageUp (line 116) | ShiftPageUp
constant ShiftPageDown (line 117) | ShiftPageDown
constant F1 (line 119) | F1
constant F2 (line 120) | F2
constant F3 (line 121) | F3
constant F4 (line 122) | F4
constant F5 (line 123) | F5
constant F6 (line 124) | F6
constant F7 (line 125) | F7
constant F8 (line 126) | F8
constant F9 (line 127) | F9
constant F10 (line 128) | F10
constant F11 (line 129) | F11
constant F12 (line 130) | F12
constant AltBackspace (line 132) | AltBackspace
constant AltUp (line 134) | AltUp
constant AltDown (line 135) | AltDown
constant AltLeft (line 136) | AltLeft
constant AltRight (line 137) | AltRight
constant AltDelete (line 138) | AltDelete
constant AltHome (line 139) | AltHome
constant AltEnd (line 140) | AltEnd
constant AltPageUp (line 141) | AltPageUp
constant AltPageDown (line 142) | AltPageDown
constant AltShiftUp (line 144) | AltShiftUp
constant AltShiftDown (line 145) | AltShiftDown
constant AltShiftLeft (line 146) | AltShiftLeft
constant AltShiftRight (line 147) | AltShiftRight
constant AltShiftDelete (line 148) | AltShiftDelete
constant AltShiftHome (line 149) | AltShiftHome
constant AltShiftEnd (line 150) | AltShiftEnd
constant AltShiftPageUp (line 151) | AltShiftPageUp
constant AltShiftPageDown (line 152) | AltShiftPageDown
constant CtrlUp (line 154) | CtrlUp
constant CtrlDown (line 155) | CtrlDown
constant CtrlLeft (line 156) | CtrlLeft
constant CtrlRight (line 157) | CtrlRight
constant CtrlHome (line 158) | CtrlHome
constant CtrlEnd (line 159) | CtrlEnd
constant CtrlBackspace (line 160) | CtrlBackspace
constant CtrlDelete (line 161) | CtrlDelete
constant CtrlPageUp (line 162) | CtrlPageUp
constant CtrlPageDown (line 163) | CtrlPageDown
constant Alt (line 165) | Alt
constant CtrlAlt (line 166) | CtrlAlt
constant CtrlAltUp (line 168) | CtrlAltUp
constant CtrlAltDown (line 169) | CtrlAltDown
constant CtrlAltLeft (line 170) | CtrlAltLeft
constant CtrlAltRight (line 171) | CtrlAltRight
constant CtrlAltHome (line 172) | CtrlAltHome
constant CtrlAltEnd (line 173) | CtrlAltEnd
constant CtrlAltBackspace (line 174) | CtrlAltBackspace
constant CtrlAltDelete (line 175) | CtrlAltDelete
constant CtrlAltPageUp (line 176) | CtrlAltPageUp
constant CtrlAltPageDown (line 177) | CtrlAltPageDown
constant CtrlShiftUp (line 179) | CtrlShiftUp
constant CtrlShiftDown (line 180) | CtrlShiftDown
constant CtrlShiftLeft (line 181) | CtrlShiftLeft
constant CtrlShiftRight (line 182) | CtrlShiftRight
constant CtrlShiftHome (line 183) | CtrlShiftHome
constant CtrlShiftEnd (line 184) | CtrlShiftEnd
constant CtrlShiftDelete (line 185) | CtrlShiftDelete
constant CtrlShiftPageUp (line 186) | CtrlShiftPageUp
constant CtrlShiftPageDown (line 187) | CtrlShiftPageDown
constant CtrlAltShiftUp (line 189) | CtrlAltShiftUp
constant CtrlAltShiftDown (line 190) | CtrlAltShiftDown
constant CtrlAltShiftLeft (line 191) | CtrlAltShiftLeft
constant CtrlAltShiftRight (line 192) | CtrlAltShiftRight
constant CtrlAltShiftHome (line 193) | CtrlAltShiftHome
constant CtrlAltShiftEnd (line 194) | CtrlAltShiftEnd
constant CtrlAltShiftDelete (line 195) | CtrlAltShiftDelete
constant CtrlAltShiftPageUp (line 196) | CtrlAltShiftPageUp
constant CtrlAltShiftPageDown (line 197) | CtrlAltShiftPageDown
constant Invalid (line 199) | Invalid
constant Fatal (line 200) | Fatal
constant BracketedPasteBegin (line 201) | BracketedPasteBegin
constant BracketedPasteEnd (line 202) | BracketedPasteEnd
constant Mouse (line 204) | Mouse
constant DoubleClick (line 205) | DoubleClick
constant LeftClick (line 206) | LeftClick
constant RightClick (line 207) | RightClick
constant SLeftClick (line 208) | SLeftClick
constant SRightClick (line 209) | SRightClick
constant ScrollUp (line 210) | ScrollUp
constant ScrollDown (line 211) | ScrollDown
constant SScrollUp (line 212) | SScrollUp
constant SScrollDown (line 213) | SScrollDown
constant PreviewScrollUp (line 214) | PreviewScrollUp
constant PreviewScrollDown (line 215) | PreviewScrollDown
constant Resize (line 218) | Resize
constant Change (line 219) | Change
constant BackwardEOF (line 220) | BackwardEOF
constant Start (line 221) | Start
constant Load (line 222) | Load
constant Focus (line 223) | Focus
constant One (line 224) | One
constant Zero (line 225) | Zero
constant Result (line 226) | Result
constant Jump (line 227) | Jump
constant JumpCancel (line 228) | JumpCancel
constant ClickHeader (line 229) | ClickHeader
constant ClickFooter (line 230) | ClickFooter
constant Multi (line 231) | Multi
function Key (line 283) | func Key(r rune) Event {
function AltKey (line 287) | func AltKey(r rune) Event {
function CtrlAltKey (line 291) | func CtrlAltKey(r rune) Event {
constant doubleClickDuration (line 296) | doubleClickDuration = 500 * time.Millisecond
type Color (line 299) | type Color
method IsDefault (line 301) | func (c Color) IsDefault() bool {
method is24 (line 305) | func (c Color) is24() bool {
type ColorAttr (line 309) | type ColorAttr struct
method IsColorDefined (line 314) | func (a ColorAttr) IsColorDefined() bool {
method IsAttrDefined (line 318) | func (a ColorAttr) IsAttrDefined() bool {
method IsUndefined (line 322) | func (a ColorAttr) IsUndefined() bool {
method Merge (line 330) | func (a ColorAttr) Merge(other ColorAttr) ColorAttr {
function NewColorAttr (line 326) | func NewColorAttr() ColorAttr {
constant colUndefined (line 341) | colUndefined Color = -2
constant colDefault (line 342) | colDefault Color = -1
constant colBlack (line 346) | colBlack Color = iota
constant colRed (line 347) | colRed
constant colGreen (line 348) | colGreen
constant colYellow (line 349) | colYellow
constant colBlue (line 350) | colBlue
constant colMagenta (line 351) | colMagenta
constant colCyan (line 352) | colCyan
constant colWhite (line 353) | colWhite
constant colGrey (line 354) | colGrey
constant colBrightRed (line 355) | colBrightRed
constant colBrightGreen (line 356) | colBrightGreen
constant colBrightYellow (line 357) | colBrightYellow
constant colBrightBlue (line 358) | colBrightBlue
constant colBrightMagenta (line 359) | colBrightMagenta
constant colBrightCyan (line 360) | colBrightCyan
constant colBrightWhite (line 361) | colBrightWhite
type FillReturn (line 364) | type FillReturn
constant FillContinue (line 367) | FillContinue FillReturn = iota
constant FillNextLine (line 368) | FillNextLine
constant FillSuspend (line 369) | FillSuspend
type ColorPair (line 372) | type ColorPair struct
method Fg (line 394) | func (p ColorPair) Fg() Color {
method Bg (line 398) | func (p ColorPair) Bg() Color {
method Ul (line 402) | func (p ColorPair) Ul() Color {
method WithUl (line 406) | func (p ColorPair) WithUl(ul Color) ColorPair {
method Attr (line 412) | func (p ColorPair) Attr() Attr {
method IsFullBgMarker (line 416) | func (p ColorPair) IsFullBgMarker() bool {
method ShouldStripColors (line 420) | func (p ColorPair) ShouldStripColors() bool {
method HasBg (line 424) | func (p ColorPair) HasBg() bool {
method merge (line 429) | func (p ColorPair) merge(other ColorPair, except Color) ColorPair {
method WithAttr (line 444) | func (p ColorPair) WithAttr(attr Attr) ColorPair {
method WithNewAttr (line 450) | func (p ColorPair) WithNewAttr(attr Attr) ColorPair {
method WithFg (line 456) | func (p ColorPair) WithFg(fg ColorAttr) ColorPair {
method WithBg (line 462) | func (p ColorPair) WithBg(bg ColorAttr) ColorPair {
method MergeAttr (line 468) | func (p ColorPair) MergeAttr(other ColorPair) ColorPair {
method Merge (line 472) | func (p ColorPair) Merge(other ColorPair) ColorPair {
method MergeNonDefault (line 476) | func (p ColorPair) MergeNonDefault(other ColorPair) ColorPair {
function HexToColor (line 379) | func HexToColor(rrggbb string) Color {
function NewColorPair (line 386) | func NewColorPair(fg Color, bg Color, attr Attr) ColorPair {
function NoColorPair (line 390) | func NoColorPair() ColorPair {
type ColorTheme (line 480) | type ColorTheme struct
type Event (line 533) | type Event struct
method Comparable (line 246) | func (e Event) Comparable() Event {
method KeyName (line 251) | func (e Event) KeyName() string {
type MouseEvent (line 539) | type MouseEvent struct
method Mod (line 551) | func (e MouseEvent) Mod() bool {
method Name (line 555) | func (e MouseEvent) Name() string {
type BorderShape (line 579) | type BorderShape
method HasLeft (line 600) | func (s BorderShape) HasLeft() bool {
method HasRight (line 608) | func (s BorderShape) HasRight() bool {
method HasTop (line 616) | func (s BorderShape) HasTop() bool {
method HasBottom (line 624) | func (s BorderShape) HasBottom() bool {
method Visible (line 632) | func (s BorderShape) Visible() bool {
constant BorderUndefined (line 582) | BorderUndefined BorderShape = iota
constant BorderLine (line 583) | BorderLine
constant BorderNone (line 584) | BorderNone
constant BorderPhantom (line 585) | BorderPhantom
constant BorderRounded (line 586) | BorderRounded
constant BorderSharp (line 587) | BorderSharp
constant BorderBold (line 588) | BorderBold
constant BorderBlock (line 589) | BorderBlock
constant BorderThinBlock (line 590) | BorderThinBlock
constant BorderDouble (line 591) | BorderDouble
constant BorderHorizontal (line 592) | BorderHorizontal
constant BorderVertical (line 593) | BorderVertical
constant BorderTop (line 594) | BorderTop
constant BorderBottom (line 595) | BorderBottom
constant BorderLeft (line 596) | BorderLeft
constant BorderRight (line 597) | BorderRight
type BorderStyle (line 636) | type BorderStyle struct
type BorderCharacter (line 648) | type BorderCharacter
function MakeBorderStyle (line 650) | func MakeBorderStyle(shape BorderShape, unicode bool) BorderStyle {
type TermSize (line 759) | type TermSize struct
type WindowType (line 766) | type WindowType
constant WindowBase (line 769) | WindowBase WindowType = iota
constant WindowList (line 770) | WindowList
constant WindowPreview (line 771) | WindowPreview
constant WindowInput (line 772) | WindowInput
constant WindowHeader (line 773) | WindowHeader
constant WindowFooter (line 774) | WindowFooter
type Renderer (line 777) | type Renderer interface
type Window (line 806) | type Window interface
type FullscreenRenderer (line 837) | type FullscreenRenderer struct
function NewFullscreenRenderer (line 847) | func NewFullscreenRenderer(theme *ColorTheme, forceBlack bool, mouse boo...
function init (line 910) | func init() {
function InitTheme (line 1169) | func InitTheme(theme *ColorTheme, baseTheme *ColorTheme, boldify bool, f...
function initPalette (line 1317) | func initPalette(theme *ColorTheme) {
function runeWidth (line 1375) | func runeWidth(r rune) int {
type WrappedLine (line 1380) | type WrappedLine struct
function WrapLine (line 1387) | func WrapLine(input string, prefixLength int, initialMax int, tabstop in...
FILE: src/tui/tui_test.go
function TestWrapLine (line 5) | func TestWrapLine(t *testing.T) {
function TestHexToColor (line 45) | func TestHexToColor(t *testing.T) {
FILE: src/util/atexit.go
function AtExit (line 11) | func AtExit(fn func()) {
function RunAtExitFuncs (line 22) | func RunAtExitFuncs() {
FILE: src/util/atexit_test.go
function TestAtExit (line 8) | func TestAtExit(t *testing.T) {
FILE: src/util/atomicbool.go
function convertBoolToInt32 (line 7) | func convertBoolToInt32(b bool) int32 {
type AtomicBool (line 16) | type AtomicBool struct
method Get (line 26) | func (a *AtomicBool) Get() bool {
method Set (line 31) | func (a *AtomicBool) Set(newState bool) bool {
function NewAtomicBool (line 21) | func NewAtomicBool(initialState bool) *AtomicBool {
FILE: src/util/atomicbool_test.go
function TestAtomicBool (line 5) | func TestAtomicBool(t *testing.T) {
FILE: src/util/chars.go
constant overflow64 (line 12) | overflow64 uint64 = 0x8080808080808080
constant overflow32 (line 13) | overflow32 uint32 = 0x80808080
type Chars (line 16) | type Chars struct
method IsBytes (line 70) | func (chars *Chars) IsBytes() bool {
method Bytes (line 74) | func (chars *Chars) Bytes() []byte {
method NumLines (line 78) | func (chars *Chars) NumLines(atMost int) (int, bool) {
method optionalRunes (line 107) | func (chars *Chars) optionalRunes() []rune {
method Get (line 114) | func (chars *Chars) Get(i int) rune {
method Length (line 121) | func (chars *Chars) Length() int {
method String (line 129) | func (chars *Chars) String() string {
method TrimLength (line 134) | func (chars *Chars) TrimLength() uint16 {
method LeadingWhitespaces (line 163) | func (chars *Chars) LeadingWhitespaces() int {
method TrailingWhitespaces (line 175) | func (chars *Chars) TrailingWhitespaces() int {
method TrimTrailingWhitespaces (line 187) | func (chars *Chars) TrimTrailingWhitespaces(maxIndex int) {
method TrimSuffix (line 193) | func (chars *Chars) TrimSuffix(runes []rune) {
method SliceRight (line 210) | func (chars *Chars) SliceRight(last int) {
method ToString (line 214) | func (chars *Chars) ToString() string {
method ToRunes (line 221) | func (chars *Chars) ToRunes() []rune {
method CopyRunes (line 233) | func (chars *Chars) CopyRunes(dest []rune, from int) {
method Prepend (line 243) | func (chars *Chars) Prepend(prefix string) {
method Lines (line 252) | func (chars *Chars) Lines(multiLine bool, maxLines int, wrapCols int, ...
function checkAscii (line 27) | func checkAscii(bytes []byte) (bool, int) {
function ToChars (line 48) | func ToChars(bytes []byte) Chars {
function RunesToChars (line 66) | func RunesToChars(runes []rune) Chars {
FILE: src/util/chars_test.go
function TestToCharsAscii (line 8) | func TestToCharsAscii(t *testing.T) {
function TestCharsLength (line 15) | func TestCharsLength(t *testing.T) {
function TestCharsToString (line 22) | func TestCharsToString(t *testing.T) {
function TestTrimLength (line 30) | func TestTrimLength(t *testing.T) {
function TestCharsLines (line 51) | func TestCharsLines(t *testing.T) {
function TestCharsLinesWrapWord (line 85) | func TestCharsLinesWrapWord(t *testing.T) {
FILE: src/util/concurrent_set.go
type ConcurrentSet (line 6) | type ConcurrentSet struct
function NewConcurrentSet (line 12) | func NewConcurrentSet[T comparable]() *ConcurrentSet[T] {
method Add (line 19) | func (s *ConcurrentSet[T]) Add(item T) {
method Remove (line 26) | func (s *ConcurrentSet[T]) Remove(item T) {
method ForEach (line 33) | func (s *ConcurrentSet[T]) ForEach(fn func(item T)) {
FILE: src/util/eventbox.go
type EventType (line 6) | type EventType
type Events (line 9) | type Events
method Clear (line 50) | func (events *Events) Clear() {
type EventBox (line 12) | type EventBox struct
method Wait (line 27) | func (b *EventBox) Wait(callback func(*Events)) {
method Set (line 39) | func (b *EventBox) Set(event EventType, value any) {
method Peek (line 57) | func (b *EventBox) Peek(event EventType) bool {
method Watch (line 65) | func (b *EventBox) Watch(events ...EventType) {
method Unwatch (line 74) | func (b *EventBox) Unwatch(events ...EventType) {
method WaitFor (line 83) | func (b *EventBox) WaitFor(event EventType) {
function NewEventBox (line 19) | func NewEventBox() *EventBox {
FILE: src/util/eventbox_test.go
constant EvtReadNew (line 7) | EvtReadNew EventType = iota
constant EvtReadFin (line 8) | EvtReadFin
constant EvtSearchNew (line 9) | EvtSearchNew
constant EvtSearchProgress (line 10) | EvtSearchProgress
constant EvtSearchFin (line 11) | EvtSearchFin
function TestEventBox (line 14) | func TestEventBox(t *testing.T) {
FILE: src/util/slab.go
type Slab (line 3) | type Slab struct
function MakeSlab (line 8) | func MakeSlab(size16 int, size32 int) *Slab {
FILE: src/util/util.go
function StringWidth (line 15) | func StringWidth(s string) int {
function RunesWidth (line 20) | func RunesWidth(runes []rune, prefixWidth int, tabstop int, limit int) (...
function StringsWidth (line 25) | func StringsWidth(str string, prefixWidth int, tabstop int, limit int) (...
function Truncate (line 47) | func Truncate(input string, limit int) ([]rune, int) {
function Constrain (line 63) | func Constrain[T cmp.Ordered](val, minimum, maximum T) T {
function AsUint16 (line 67) | func AsUint16(val int) uint16 {
function IsTty (line 77) | func IsTty(file *os.File) bool {
function RunOnce (line 83) | func RunOnce(f func()) func() {
function Once (line 93) | func Once(nextResponse bool) func() bool {
function RepeatToFill (line 103) | func RepeatToFill(str string, length int, limit int) string {
function ToKebabCase (line 123) | func ToKebabCase(s string) string {
function CompareVersions (line 135) | func CompareVersions(v1, v2 string) int {
FILE: src/util/util_test.go
function TestConstrain (line 9) | func TestConstrain(t *testing.T) {
function TestAsUint16 (line 22) | func TestAsUint16(t *testing.T) {
function TestOnce (line 43) | func TestOnce(t *testing.T) {
function TestRunesWidth (line 67) | func TestRunesWidth(t *testing.T) {
function TestTruncate (line 95) | func TestTruncate(t *testing.T) {
function TestRepeatToFill (line 105) | func TestRepeatToFill(t *testing.T) {
function TestStringWidth (line 114) | func TestStringWidth(t *testing.T) {
function TestCompareVersions (line 121) | func TestCompareVersions(t *testing.T) {
FILE: src/util/util_unix.go
type Executor (line 16) | type Executor struct
method ExecCommand (line 49) | func (x *Executor) ExecCommand(command string, setpgid bool) *exec.Cmd {
method QuoteEntry (line 57) | func (x *Executor) QuoteEntry(entry string) string {
method Become (line 61) | func (x *Executor) Become(stdin *os.File, environ []string, command st...
function NewExecutor (line 22) | func NewExecutor(withShell string) *Executor {
function KillCommand (line 73) | func KillCommand(cmd *exec.Cmd) error {
function IsWindows (line 78) | func IsWindows() bool {
function SetNonblock (line 83) | func SetNonblock(file *os.File, nonblock bool) {
function Read (line 88) | func Read(fd int, b []byte) (int, error) {
function SetStdin (line 92) | func SetStdin(file *os.File) {
FILE: src/util/util_windows.go
type shellType (line 16) | type shellType
constant shellTypeUnknown (line 19) | shellTypeUnknown shellType = iota
constant shellTypeCmd (line 20) | shellTypeCmd
constant shellTypePowerShell (line 21) | shellTypePowerShell
type Executor (line 26) | type Executor struct
method ExecCommand (line 63) | func (x *Executor) ExecCommand(command string, setpgid bool) *exec.Cmd {
method Become (line 94) | func (x *Executor) Become(stdin *os.File, environ []string, command st...
method QuoteEntry (line 142) | func (x *Executor) QuoteEntry(entry string) string {
function NewExecutor (line 33) | func NewExecutor(withShell string) *Executor {
function escapeArg (line 114) | func escapeArg(s string) string {
function KillCommand (line 168) | func KillCommand(cmd *exec.Cmd) error {
function IsWindows (line 173) | func IsWindows() bool {
function SetNonblock (line 178) | func SetNonblock(file *os.File, nonblock bool) {
function Read (line 183) | func Read(fd int, b []byte) (int, error) {
function SetStdin (line 187) | func SetStdin(file *os.File) {
FILE: src/winpty.go
function needWinpty (line 7) | func needWinpty(_ *Options) bool {
function runWinpty (line 11) | func runWinpty(_ []string, _ *Options) (int, error) {
FILE: src/winpty_windows.go
function isMintty345 (line 14) | func isMintty345() bool {
function needWinpty (line 18) | func needWinpty(opts *Options) bool {
function runWinpty (line 46) | func runWinpty(args []string, opts *Options) (int, error) {
FILE: test/lib/common.rb
function wait (line 30) | def wait(timeout = DEFAULT_TIMEOUT)
class Shell (line 42) | class Shell
method bash (line 44) | def bash
method zsh (line 56) | def zsh
method fish (line 69) | def fish
class Tmux (line 84) | class Tmux
method initialize (line 87) | def initialize(shell = :bash)
method kill (line 96) | def kill
method focus (line 100) | def focus
method send_keys (line 104) | def send_keys(*args)
method paste (line 108) | def paste(str)
method capture (line 112) | def capture
method until (line 116) | def until(refresh = false, timeout: DEFAULT_TIMEOUT)
method prepare (line 160) | def prepare
method go (line 177) | def go(args)
class TestBase (line 182) | class TestBase < Minitest::Test
method writelines (line 186) | def writelines(lines)
method tempname (line 190) | def tempname
method fzf_output (line 194) | def fzf_output
method fzf_output_lines (line 198) | def fzf_output_lines
method setup (line 202) | def setup
method teardown (line 206) | def teardown
method assert_equal (line 211) | def assert_equal(expected, actual)
method fzf (line 218) | def fzf(*opts)
method fzf! (line 225) | def fzf!(*opts)
class TestInteractive (line 239) | class TestInteractive < TestBase
method setup (line 242) | def setup
method teardown (line 247) | def teardown
FILE: test/test_core.rb
class TestCore (line 6) | class TestCore < TestInteractive
method test_fzf_default_command (line 7) | def test_fzf_default_command
method test_fzf_default_command_failure (line 15) | def test_fzf_default_command_failure
method test_key_bindings (line 21) | def test_key_bindings
method test_file_word (line 86) | def test_file_word
method test_multi_order (line 99) | def test_multi_order
method test_subword_forward (line 111) | def test_subword_forward
method test_subword_backward (line 128) | def test_subword_backward
method test_multi_max (line 145) | def test_multi_max
method test_multi_action (line 212) | def test_multi_action
method test_with_nth (line 231) | def test_with_nth
method test_scroll (line 259) | def test_scroll
method test_select_1 (line 270) | def test_select_1
method test_select_1_accept_nth (line 275) | def test_select_1_accept_nth
method test_exit_0 (line 280) | def test_exit_0
method test_select_1_exit_0_fail (line 285) | def test_select_1_exit_0_fail
method test_query_unicode (line 296) | def test_query_unicode
method test_sync (line 303) | def test_sync
method test_tac (line 316) | def test_tac
method test_tac_sort (line 325) | def test_tac_sort
method test_tac_nosort (line 336) | def test_tac_nosort
method test_expect (line 347) | def test_expect
method test_expect_with_bound_actions (line 372) | def test_expect_with_bound_actions
method test_expect_print_query (line 379) | def test_expect_print_query
method test_expect_printable_character_print_query (line 388) | def test_expect_printable_character_print_query
method test_expect_print_query_select_1 (line 397) | def test_expect_print_query_select_1
method test_toggle_sort (line 402) | def test_toggle_sort
method test_invalid_cache (line 417) | def test_invalid_cache
method test_invalid_cache_query_type (line 427) | def test_invalid_cache_query_type
method test_bind (line 459) | def test_bind
method test_bind_print_query (line 466) | def test_bind_print_query
method test_bind_replace_query (line 473) | def test_bind_replace_query
method test_select_all_deselect_all_toggle_all (line 482) | def test_select_all_deselect_all_toggle_all
method test_history (line 512) | def test_history
method test_cycle (line 565) | def test_cycle
method test_header_lines (line 584) | def test_header_lines
method test_header_lines_reverse (line 599) | def test_header_lines_reverse
method test_header_lines_reverse_list (line 614) | def test_header_lines_reverse_list
method test_header_lines_overflow (line 629) | def test_header_lines_overflow
method test_header_lines_with_nth (line 639) | def test_header_lines_with_nth
method test_header (line 651) | def test_header
method test_header_reverse (line 661) | def test_header_reverse
method test_header_reverse_list (line 671) | def test_header_reverse_list
method test_header_and_header_lines (line 681) | def test_header_and_header_lines
method test_header_and_header_lines_reverse (line 691) | def test_header_and_header_lines_reverse
method test_header_and_header_lines_reverse_list (line 701) | def test_header_and_header_lines_reverse_list
method test_cancel (line 711) | def test_cancel
method test_margin (line 727) | def test_margin
method test_margin_reverse (line 736) | def test_margin_reverse
method test_margin_reverse_list (line 742) | def test_margin_reverse_list
method test_tabstop (line 751) | def test_tabstop
method test_exit_0_exit_code (line 773) | def test_exit_0_exit_code
method test_invalid_option (line 778) | def test_invalid_option
method test_exitstatus_empty (line 784) | def test_exitstatus_empty
method test_hscroll_off (line 793) | def test_hscroll_off
method test_partial_caching (line 809) | def test_partial_caching
method test_jump (line 819) | def test_jump
method test_jump_accept (line 847) | def test_jump_accept
method test_jump_events (line 856) | def test_jump_events
method test_jump_no_pointer (line 869) | def test_jump_no_pointer
method test_jump_no_pointer_no_marker (line 878) | def test_jump_no_pointer_no_marker
method test_pointer (line 887) | def test_pointer
method test_pointer_with_jump (line 893) | def test_pointer_with_jump
method test_marker (line 905) | def test_marker
method test_no_clear (line 913) | def test_no_clear
method test_info_hidden (line 922) | def test_info_hidden
method test_info_inline_separator (line 927) | def test_info_inline_separator
method test_change_first_last (line 932) | def test_change_first_last
method test_pos (line 950) | def test_pos
method test_put (line 965) | def test_put
method test_accept_non_empty (line 974) | def test_accept_non_empty
method test_accept_non_empty_with_multi_selection (line 990) | def test_accept_non_empty_with_multi_selection
method test_accept_non_empty_with_empty_list (line 1002) | def test_accept_non_empty_with_empty_list
method test_accept_or_print_query_without_match (line 1010) | def test_accept_or_print_query_without_match
method test_accept_or_print_query_with_match (line 1019) | def test_accept_or_print_query_with_match
method test_accept_or_print_query_with_multi_selection (line 1028) | def test_accept_or_print_query_with_multi_selection
method test_inverse_only_search_should_not_sort_the_result (line 1039) | def test_inverse_only_search_should_not_sort_the_result
method test_disabled (line 1055) | def test_disabled
method test_clear_query (line 1086) | def test_clear_query
method test_change_query (line 1096) | def test_change_query
method test_transform_query (line 1104) | def test_transform_query
method test_transform_prompt (line 1113) | def test_transform_prompt
method test_transform (line 1122) | def test_transform
method test_search (line 1129) | def test_search
method test_transform_search (line 1138) | def test_transform_search
method test_clear_selection (line 1147) | def test_clear_selection
method test_backward_delete_char_eof (line 1158) | def test_backward_delete_char_eof
method test_strip_xterm_osc_sequence (line 1171) | def test_strip_xterm_osc_sequence
method test_keep_right (line 1184) | def test_keep_right
method test_freeze_left_tabstop (line 1193) | def test_freeze_left_tabstop
method test_freeze_left_keep_right (line 1203) | def test_freeze_left_keep_right
method test_freeze_left_and_right (line 1214) | def test_freeze_left_and_right
method test_freeze_left_and_right_delimiter (line 1221) | def test_freeze_left_and_right_delimiter
method test_freeze_right_exceed_range (line 1228) | def test_freeze_right_exceed_range
method test_freeze_right_exceed_range_with_freeze_left (line 1240) | def test_freeze_right_exceed_range_with_freeze_left
method test_freeze_right_with_ellipsis_and_scrolling (line 1248) | def test_freeze_right_with_ellipsis_and_scrolling
method test_backward_eof (line 1258) | def test_backward_eof
method test_change_prompt (line 1269) | def test_change_prompt
method test_select_deselect (line 1278) | def test_select_deselect
method test_unbind_rebind_toggle_bind (line 1299) | def test_unbind_rebind_toggle_bind
method test_scroll_off (line 1316) | def test_scroll_off
method test_scroll_off_large (line 1335) | def test_scroll_off_large
method test_ellipsis (line 1349) | def test_ellipsis
method test_start_event (line 1355) | def test_start_event
method test_focus_event (line 1363) | def test_focus_event
method test_result_event (line 1380) | def test_result_event
method test_labels_center (line 1390) | def test_labels_center
method test_labels_left (line 1408) | def test_labels_left
method test_labels_right (line 1416) | def test_labels_right
method test_labels_bottom (line 1424) | def test_labels_bottom
method test_labels_variables (line 1432) | def test_labels_variables
method test_info_separator_unicode (line 1453) | def test_info_separator_unicode
method test_info_separator_no_unicode (line 1458) | def test_info_separator_no_unicode
method test_info_separator_repeat (line 1463) | def test_info_separator_repeat
method test_info_separator_ansi_colors_and_tabs (line 1468) | def test_info_separator_ansi_colors_and_tabs
method test_info_no_separator (line 1473) | def test_info_no_separator
method test_info_right (line 1478) | def test_info_right
method test_info_inline_right (line 1483) | def test_info_inline_right
method test_info_inline_right_clearance (line 1488) | def test_info_inline_right_clearance
method test_info_command (line 1495) | def test_info_command
method test_info_command_inline (line 1502) | def test_info_command_inline
method test_info_command_right (line 1507) | def test_info_command_right
method test_info_command_inline_right (line 1512) | def test_info_command_inline_right
method test_info_command_inline_right_no_ansi (line 1517) | def test_info_command_inline_right_no_ansi
method test_info_command_and_focus (line 1522) | def test_info_command_and_focus
method test_prev_next_selected (line 1529) | def test_prev_next_selected
method test_track (line 1548) | def test_track
method test_track_action (line 1600) | def test_track_action
method test_track_nth_reload_whole_line (line 1662) | def test_track_nth_reload_whole_line
method test_track_nth_reload_field (line 1685) | def test_track_nth_reload_field
method test_track_nth_reload_no_match (line 1705) | def test_track_nth_reload_no_match
method test_track_nth_blocked_indicator (line 1722) | def test_track_nth_blocked_indicator
method test_track_nth_abort_unblocks (line 1742) | def test_track_nth_abort_unblocks
method test_track_nth_reload_async_unblocks_early (line 1762) | def test_track_nth_reload_async_unblocks_early
method test_track_nth_reload_sync_blocks_until_complete (line 1784) | def test_track_nth_reload_sync_blocks_until_complete
method test_track_nth_toggle_track_unblocks (line 1811) | def test_track_nth_toggle_track_unblocks
method test_track_nth_reload_async_no_match (line 1830) | def test_track_nth_reload_async_no_match
method test_track_action_with_id_nth (line 1849) | def test_track_action_with_id_nth
method test_id_nth_preserve_multi_selection (line 1868) | def test_id_nth_preserve_multi_selection
method test_one_and_zero (line 1892) | def test_one_and_zero
method test_height_range_with_exit_0 (line 1912) | def test_height_range_with_exit_0
method test_delete_with_modifiers (line 1919) | def test_delete_with_modifiers
method test_fzf_pos (line 1933) | def test_fzf_pos
method test_change_nth (line 1944) | def test_change_nth
method test_change_with_nth (line 1988) | def test_change_with_nth
method test_change_with_nth_default (line 2023) | def test_change_with_nth_default
method test_transform_with_nth_search (line 2045) | def test_transform_with_nth_search
method test_bg_transform_with_nth_output (line 2062) | def test_bg_transform_with_nth_output
method test_change_with_nth_search (line 2077) | def test_change_with_nth_search
method test_change_with_nth_output (line 2094) | def test_change_with_nth_output
method test_change_with_nth_selection (line 2109) | def test_change_with_nth_selection
method test_change_with_nth_multiline (line 2136) | def test_change_with_nth_multiline
method test_env_vars (line 2173) | def test_env_vars
method test_abort_action_chain (line 2222) | def test_abort_action_chain
method test_exclude_multi (line 2235) | def test_exclude_multi
method test_exclude (line 2271) | def test_exclude
method test_accept_nth (line 2316) | def test_accept_nth
method test_accept_nth_string_delimiter (line 2324) | def test_accept_nth_string_delimiter
method test_accept_nth_regex_delimiter (line 2333) | def test_accept_nth_regex_delimiter
method test_accept_nth_regex_delimiter_strip_last (line 2342) | def test_accept_nth_regex_delimiter_strip_last
method test_accept_nth_template (line 2351) | def test_accept_nth_template
method test_ghost (line 2360) | def test_ghost
method test_ghost_inline (line 2382) | def test_ghost_inline
method test_offset_middle (line 2397) | def test_offset_middle
method test_no_input_query (line 2407) | def test_no_input_query
method test_no_input_change_query (line 2417) | def test_no_input_change_query
method test_search_override_query_in_no_input_mode (line 2432) | def test_search_override_query_in_no_input_mode
method test_change_pointer (line 2441) | def test_change_pointer
method test_transform_pointer (line 2456) | def test_transform_pointer
method test_change_header_on_header_window (line 2471) | def test_change_header_on_header_window
method test_trailing_new_line (line 2481) | def test_trailing_new_line
method test_async_transform (line 2486) | def test_async_transform
method test_bg_cancel (line 2511) | def test_bg_cancel
method test_render_order (line 2528) | def test_render_order
method test_multi_event (line 2535) | def test_multi_event
method test_preserve_selection_on_revision_bump (line 2546) | def test_preserve_selection_on_revision_bump
method test_trigger (line 2579) | def test_trigger
method test_change_nth_unset_default (line 2589) | def test_change_nth_unset_default
method test_change_header_lines (line 2604) | def test_change_header_lines
method test_change_header_lines_to_zero (line 2622) | def test_change_header_lines_to_zero
method test_change_header_lines_deselect (line 2636) | def test_change_header_lines_deselect
method test_change_header_lines_reverse (line 2665) | def test_change_header_lines_reverse
method test_zero_width_characters (line 2678) | def test_zero_width_characters
FILE: test/test_exec.rb
class TestExec (line 6) | class TestExec < TestInteractive
method test_execute (line 7) | def test_execute
method test_execute_multi (line 50) | def test_execute_multi
method test_execute_plus_flag (line 86) | def test_execute_plus_flag
method test_execute_shell (line 124) | def test_execute_shell
method test_interrupt_execute (line 143) | def test_interrupt_execute
method test_kill_default_command_on_abort (line 154) | def test_kill_default_command_on_abort
method test_kill_default_command_on_accept (line 170) | def test_kill_default_command_on_accept
method test_kill_reload_command_on_abort (line 185) | def test_kill_reload_command_on_abort
method test_kill_reload_command_on_accept (line 203) | def test_kill_reload_command_on_accept
method test_reload (line 220) | def test_reload
method test_reload_even_when_theres_no_match (line 239) | def test_reload_even_when_theres_no_match
method test_reload_should_terminate_standard_input_stream (line 246) | def test_reload_should_terminate_standard_input_stream
method test_clear_list_when_header_lines_changed_due_to_reload (line 251) | def test_clear_list_when_header_lines_changed_due_to_reload
method test_item_index_reset_on_reload (line 258) | def test_item_index_reset_on_reload
method test_reload_should_update_preview (line 274) | def test_reload_should_update_preview
method test_reload_and_change_preview_should_update_preview (line 281) | def test_reload_and_change_preview_should_update_preview
method test_reload_sync (line 290) | def test_reload_sync
method test_reload_disabled_case1 (line 299) | def test_reload_disabled_case1
method test_reload_disabled_case2 (line 312) | def test_reload_disabled_case2
method test_reload_disabled_case3 (line 325) | def test_reload_disabled_case3
method test_reload_disabled_case4 (line 338) | def test_reload_disabled_case4
method test_reload_disabled_case5 (line 351) | def test_reload_disabled_case5
method test_reload_disabled_case6 (line 366) | def test_reload_disabled_case6
method test_reload_and_change (line 377) | def test_reload_and_change
method test_become_tty (line 382) | def test_become_tty
method test_disabled_preview_update (line 387) | def test_disabled_preview_update
method test_start_on_reload (line 395) | def test_start_on_reload
method test_become (line 405) | def test_become
FILE: test/test_filter.rb
class TestFilter (line 6) | class TestFilter < TestBase
method test_default_extended (line 7) | def test_default_extended
method test_exact (line 12) | def test_exact
method test_or_operator (line 18) | def test_or_operator
method test_smart_case_for_each_term (line 24) | def test_smart_case_for_each_term
method test_filter_exitstatus (line 28) | def test_filter_exitstatus
method test_long_line (line 39) | def test_long_line
method test_read0 (line 47) | def test_read0
method test_nth_suffix_match (line 55) | def test_nth_suffix_match
method test_with_nth_basic (line 61) | def test_with_nth_basic
method test_with_nth_template (line 68) | def test_with_nth_template
method test_with_nth_ansi (line 75) | def test_with_nth_ansi
method test_with_nth_no_ansi (line 82) | def test_with_nth_no_ansi
method test_escaped_meta_characters (line 90) | def test_escaped_meta_characters
method test_normalized_match (line 108) | def test_normalized_match
method test_unicode_case (line 116) | def test_unicode_case
method test_tiebreak (line 122) | def test_tiebreak
method test_tiebreak_index_begin (line 161) | def test_tiebreak_index_begin
method test_tiebreak_begin_algo_v2 (line 210) | def test_tiebreak_begin_algo_v2
method test_tiebreak_end (line 219) | def test_tiebreak_end
method test_tiebreak_length_with_nth (line 261) | def test_tiebreak_length_with_nth
method test_tiebreak_chunk (line 282) | def test_tiebreak_chunk
method test_boundary_match (line 304) | def test_boundary_match
method test_accept_nth (line 316) | def test_accept_nth
method test_header_lines_filter (line 330) | def test_header_lines_filter
method test_header_lines_filter_with_nth (line 339) | def test_header_lines_filter_with_nth
method test_header_lines_all_headers (line 347) | def test_header_lines_all_headers
FILE: test/test_layout.rb
class TestLayout (line 6) | class TestLayout < TestInteractive
method assert_block (line 7) | def assert_block(expected, lines)
method test_vanilla (line 14) | def test_vanilla
method test_header_first (line 38) | def test_header_first
method test_header_first_reverse (line 52) | def test_header_first_reverse
method test_change_and_transform_header (line 65) | def test_change_and_transform_header
method test_change_header (line 100) | def test_change_header
method test_reload_and_change_cache (line 126) | def test_reload_and_change_cache
method test_toggle_header (line 144) | def test_toggle_header
method test_height_range_fit (line 177) | def test_height_range_fit
method test_height_range_fit_preview_above (line 190) | def test_height_range_fit_preview_above
method test_height_range_fit_preview_above_alternative (line 209) | def test_height_range_fit_preview_above_alternative
method test_height_range_fit_preview_left (line 230) | def test_height_range_fit_preview_left
method test_height_range_overflow (line 246) | def test_height_range_overflow
method test_no_extra_newline_issue_3209 (line 258) | def test_no_extra_newline_issue_3209
method test_fzf_multi_line (line 275) | def test_fzf_multi_line
method test_fzf_multi_line_reverse (line 308) | def test_fzf_multi_line_reverse
method test_fzf_multi_line_no_pointer_and_marker (line 324) | def test_fzf_multi_line_no_pointer_and_marker
method test_gap (line 340) | def test_gap
method test_gap_2 (line 357) | def test_gap_2
method test_list_border_and_label (line 374) | def test_list_border_and_label
method test_input_border_and_label (line 391) | def test_input_border_and_label
method test_input_border_and_label_header_first (line 409) | def test_input_border_and_label_header_first
method test_list_input_border_and_label (line 427) | def test_list_input_border_and_label
method test_list_input_border_and_label_header_first (line 466) | def test_list_input_border_and_label_header_first
method test_header_border_and_label (line 505) | def test_header_border_and_label
method test_header_border_toggle (line 524) | def test_header_border_toggle
method test_header_border_toggle_with_header_lines (line 556) | def test_header_border_toggle_with_header_lines
method test_header_border_toggle_with_header_lines_header_first (line 591) | def test_header_border_toggle_with_header_lines_header_first
method test_header_border_toggle_with_header_lines_header_lines_border (line 626) | def test_header_border_toggle_with_header_lines_header_lines_border
method test_header_border_toggle_with_header_lines_header_first_header_lines_border (line 662) | def test_header_border_toggle_with_header_lines_header_first_header_li...
method test_header_border_and_label_header_first (line 698) | def test_header_border_and_label_header_first
method test_header_border_and_label_with_list_border (line 717) | def test_header_border_and_label_with_list_border
method test_header_border_and_label_with_list_border_header_first (line 737) | def test_header_border_and_label_with_list_border_header_first
method test_all_borders (line 757) | def test_all_borders
method test_all_borders_header_first (line 779) | def test_all_borders_header_first
method test_style_full_adaptive_height (line 801) | def test_style_full_adaptive_height
method test_style_full_adaptive_height_double (line 817) | def test_style_full_adaptive_height_double
method test_preview_window_noinfo (line 835) | def test_preview_window_noinfo
method test_min_height_no_auto (line 849) | def test_min_height_no_auto
method test_min_height_auto (line 862) | def test_min_height_auto
method test_min_height_auto_no_input (line 880) | def test_min_height_auto_no_input
method test_min_height_auto_no_input_reverse_list (line 895) | def test_min_height_auto_no_input_reverse_list
method test_layout_reverse_list (line 927) | def test_layout_reverse_list
method test_layout_default_with_footer (line 982) | def test_layout_default_with_footer
method test_layout_reverse_list_with_footer (line 1044) | def test_layout_reverse_list_with_footer
method test_change_header_and_label_at_once (line 1104) | def test_change_header_and_label_at_once
method test_label_truncation (line 1117) | def test_label_truncation
method test_separator_no_ellipsis (line 1139) | def test_separator_no_ellipsis
method test_header_border_no_pointer_and_marker (line 1147) | def test_header_border_no_pointer_and_marker
method test_gutter_default (line 1159) | def test_gutter_default
method test_gutter_default_no_unicode (line 1171) | def test_gutter_default_no_unicode
method test_gutter_custom (line 1183) | def test_gutter_custom
method test_no_scrollbar_preview_toggle (line 1196) | def test_no_scrollbar_preview_toggle
method test_header_and_footer_should_not_be_wider_than_list (line 1218) | def test_header_and_footer_should_not_be_wider_than_list
method test_combinations (line 1227) | def test_combinations
FILE: test/test_preview.rb
class TestPreview (line 6) | class TestPreview < TestInteractive
method test_preview (line 7) | def test_preview
method test_toggle_preview_without_default_preview_command (line 35) | def test_toggle_preview_without_default_preview_command
method test_show_and_hide_preview (line 73) | def test_show_and_hide_preview
method test_preview_hidden (line 112) | def test_preview_hidden
method test_preview_size_0 (line 123) | def test_preview_size_0
method test_preview_size_0_hidden (line 148) | def test_preview_size_0_hidden
method test_preview_flags (line 173) | def test_preview_flags
method test_preview_asterisk (line 192) | def test_preview_asterisk
method test_preview_file (line 206) | def test_preview_file
method test_preview_q_no_match (line 215) | def test_preview_q_no_match
method test_preview_q_no_match_with_initial_query (line 225) | def test_preview_q_no_match_with_initial_query
method test_preview_update_on_select (line 233) | def test_preview_update_on_select
method test_preview_correct_tab_width_after_ansi_reset_code (line 243) | def test_preview_correct_tab_width_after_ansi_reset_code
method test_preview_bindings_with_default_preview (line 249) | def test_preview_bindings_with_default_preview
method test_preview_bindings_without_default_preview (line 263) | def test_preview_bindings_without_default_preview
method test_preview_scroll_begin_constant (line 279) | def test_preview_scroll_begin_constant
method test_preview_scroll_begin_expr (line 285) | def test_preview_scroll_begin_expr
method test_preview_scroll_begin_and_offset (line 291) | def test_preview_scroll_begin_and_offset
method test_preview_clear_screen (line 300) | def test_preview_clear_screen
method test_preview_window_follow (line 306) | def test_preview_window_follow
method test_toggle_preview_wrap (line 373) | def test_toggle_preview_wrap
method test_preview_follow_wrap (line 386) | def test_preview_follow_wrap
method test_preview_follow_wrap_long_line (line 396) | def test_preview_follow_wrap_long_line
method test_close (line 410) | def test_close
method test_preview_header (line 423) | def test_preview_header
method test_change_preview_window (line 449) | def test_change_preview_window
method test_change_preview_window_should_not_reset_change_preview (line 498) | def test_change_preview_window_should_not_reset_change_preview
method test_change_preview_window_rotate (line 505) | def test_change_preview_window_rotate
method test_change_preview_window_rotate_hidden (line 523) | def test_change_preview_window_rotate_hidden
method test_change_preview_window_rotate_hidden_down (line 540) | def test_change_preview_window_rotate_hidden_down
method test_toggle_alternative_preview_window (line 556) | def test_toggle_alternative_preview_window
method test_alternative_preview_window_opts (line 564) | def test_alternative_preview_window_opts
method test_preview_window_width_exception (line 572) | def test_preview_window_width_exception
method test_preview_window_hidden_on_focus (line 579) | def test_preview_window_hidden_on_focus
method test_preview_query_should_not_be_affected_by_search (line 586) | def test_preview_query_should_not_be_affected_by_search
method test_preview_wrap_sign_between_ansi_fragments (line 600) | def test_preview_wrap_sign_between_ansi_fragments
method test_preview_wrap_sign_between_ansi_fragments_overflow (line 609) | def test_preview_wrap_sign_between_ansi_fragments_overflow
method test_preview_wrap_sign_between_ansi_fragments_overflow2 (line 618) | def test_preview_wrap_sign_between_ansi_fragments_overflow2
FILE: test/test_raw.rb
class TestRaw (line 6) | class TestRaw < TestInteractive
method test_raw_mode (line 7) | def test_raw_mode
method test_raw_best (line 106) | def test_raw_best
FILE: test/test_server.rb
class TestServer (line 6) | class TestServer < TestInteractive
method test_listen (line 7) | def test_listen
method test_listen_with_api_key (line 33) | def test_listen_with_api_key
FILE: test/test_shell_integration.rb
type TestShell (line 6) | module TestShell
function setup (line 9) | def setup
function teardown (line 14) | def teardown
function set_var (line 18) | def set_var(name, val)
function unset_var (line 24) | def unset_var(name)
function trigger (line 30) | def trigger
function test_ctrl_t (line 34) | def test_ctrl_t
function test_ctrl_t_unicode (line 47) | def test_ctrl_t_unicode
function test_alt_c (line 76) | def test_alt_c
function test_alt_c_command (line 87) | def test_alt_c_command
function test_ctrl_r (line 103) | def test_ctrl_r
function test_ctrl_r_multiline (line 131) | def test_ctrl_r_multiline
function test_ctrl_r_abort (line 149) | def test_ctrl_r_abort
type CompletionTest (line 163) | module CompletionTest
function test_file_completion (line 164) | def test_file_completion
function test_file_completion_root (line 256) | def test_file_completion_root
function test_dir_completion (line 266) | def test_dir_completion
function test_process_completion (line 309) | def test_process_completion
function test_custom_completion (line 335) | def test_custom_completion
function test_unset_completion (line 347) | def test_unset_completion
function test_completion_in_command_sequence (line 368) | def test_completion_in_command_sequence
function test_file_completion_unicode (line 401) | def test_file_completion_unicode
function test_custom_completion_api (line 434) | def test_custom_completion_api
function test_ssh_completion (line 458) | def test_ssh_completion
function test_option_equals_long_option (line 487) | def test_option_equals_long_option
function test_option_equals_long_option_after_double_dash (line 524) | def test_option_equals_long_option_after_double_dash
function test_option_equals_short_option (line 554) | def test_option_equals_short_option
function test_option_equals_short_option_after_double_dash (line 584) | def test_option_equals_short_option_after_double_dash
function test_option_no_equals_long_option (line 614) | def test_option_no_equals_long_option
function test_option_no_equals_long_option_after_double_dash (line 634) | def test_option_no_equals_long_option_after_double_dash
function test_option_no_equals_short_option (line 654) | def test_option_no_equals_short_option
function test_option_no_equals_short_option_after_double_dash (line 684) | def test_option_no_equals_short_option_after_double_dash
function test_filename_with_newline (line 704) | def test_filename_with_newline
function test_path_with_special_chars (line 738) | def test_path_with_special_chars
function test_query_with_dollar_anchor (line 754) | def test_query_with_dollar_anchor
function test_single_flag_completion (line 776) | def test_single_flag_completion
function test_double_flag_completion (line 798) | def test_double_flag_completion
class TestBash (line 821) | class TestBash < TestBase
method shell (line 825) | def shell
method new_shell (line 829) | def new_shell
method test_dynamic_completion_loader (line 835) | def test_dynamic_completion_loader
class TestZsh (line 853) | class TestZsh < TestBase
method shell (line 857) | def shell
method new_shell (line 861) | def new_shell
method test_complete_quoted_command (line 866) | def test_complete_quoted_command
method test_perl_and_awk (line 879) | def self.test_perl_and_awk(name, &block)
method prepare_ctrl_r_test (line 895) | def prepare_ctrl_r_test
class TestFish (line 993) | class TestFish < TestBase
method shell (line 997) | def shell
method trigger (line 1001) | def trigger
method new_shell (line 1005) | def new_shell
method set_var (line 1011) | def set_var(name, val)
method test_ctrl_r_multi (line 1017) | def test_ctrl_r_multi
Condensed preview — 144 files, each showing path, character count, and a content snippet. Download the .json file or copy for the full structured content (1,696K chars).
[
{
"path": ".editorconfig",
"chars": 467,
"preview": "root = true\n\n[*.{sh,bash}]\nindent_style = space\nindent_size = 2\nsimplify = true\nbinary_next_line "
},
{
"path": ".github/FUNDING.yml",
"chars": 17,
"preview": "github: junegunn\n"
},
{
"path": ".github/ISSUE_TEMPLATE/issue_template.yml",
"chars": 1162,
"preview": "---\nname: Issue Template\ndescription: Report a problem or bug related to fzf to help us improve\n\nbody:\n - type: markdow"
},
{
"path": ".github/dependabot.yml",
"chars": 209,
"preview": "version: 2\nupdates:\n - package-ecosystem: \"gomod\"\n directory: \"/\"\n schedule:\n interval: \"weekly\"\n - package"
},
{
"path": ".github/labeler.yml",
"chars": 1084,
"preview": "go:\n - changed-files:\n - any-glob-to-any-file:\n - src/**\n - main.go\n - go.mod\n "
},
{
"path": ".github/workflows/codeql-analysis.yml",
"chars": 1111,
"preview": "# https://docs.github.com/en/free-pro-team@latest/github/finding-security-vulnerabilities-and-errors-in-your-code/config"
},
{
"path": ".github/workflows/depsreview.yaml",
"chars": 296,
"preview": "name: 'Dependency Review'\non: [pull_request]\n\npermissions:\n contents: read\n\njobs:\n dependency-review:\n runs-on: ubu"
},
{
"path": ".github/workflows/labeler.yml",
"chars": 292,
"preview": "name: Label PRs\n\non:\n pull_request_target:\n types: [opened, synchronize, reopened]\n\npermissions:\n contents: read\n "
},
{
"path": ".github/workflows/linux.yml",
"chars": 1013,
"preview": "---\nname: build\n\non:\n push:\n branches: [ master, devel ]\n pull_request:\n branches: [ master ]\n workflow_dispatc"
},
{
"path": ".github/workflows/macos.yml",
"chars": 1007,
"preview": "---\nname: Test fzf on macOS\n\non:\n push:\n branches: [ master, devel ]\n pull_request:\n branches: [ master ]\n work"
},
{
"path": ".github/workflows/sponsors.yml",
"chars": 545,
"preview": "---\nname: Generate Sponsors README\non:\n workflow_dispatch:\n schedule:\n - cron: 0 15 * * 6\njobs:\n deploy:\n runs-"
},
{
"path": ".github/workflows/typos.yml",
"chars": 193,
"preview": "name: \"Spell Check\"\non: [pull_request]\n\njobs:\n typos:\n name: Spell Check with Typos\n runs-on: ubuntu-latest\n s"
},
{
"path": ".github/workflows/winget.yml",
"chars": 326,
"preview": "name: Publish to Winget\non:\n release:\n types: [released]\n\njobs:\n publish:\n runs-on: ubuntu-latest\n steps:\n "
},
{
"path": ".gitignore",
"chars": 97,
"preview": "bin/fzf\nbin/fzf.exe\ndist\ntarget\npkg\n.DS_Store\ndoc/tags\nvendor\ngopath\n*.zwc\nfzf\ntmp\n*.patch\n.idea\n"
},
{
"path": ".goreleaser.yml",
"chars": 2488,
"preview": "---\nversion: 2\nproject_name: fzf\n\nbefore:\n hooks:\n - go mod download\n\nbuilds:\n - id: fzf\n goos:\n - darwin\n "
},
{
"path": ".rubocop.yml",
"chars": 794,
"preview": "AllCops:\n NewCops: enable\nLayout/LineLength:\n Enabled: false\nMetrics:\n Enabled: false\nLint/ShadowingOuterLocalVariabl"
},
{
"path": ".tool-versions",
"chars": 32,
"preview": "golang 1.23\nruby 3.4\nshfmt 3.12\n"
},
{
"path": "ADVANCED.md",
"chars": 28820,
"preview": "Advanced fzf examples\n======================\n\n* *Last update: 2025/02/02*\n* *Requires fzf 0.59.0 or later*\n\n---\n\n<!-- vi"
},
{
"path": "BUILD.md",
"chars": 1917,
"preview": "Building fzf\n============\n\nBuild instructions\n------------------\n\n### Prerequisites\n\n- Go 1.23 or above\n\n### Using Makef"
},
{
"path": "CHANGELOG.md",
"chars": 129841,
"preview": "CHANGELOG\n=========\n\n0.71.0\n------\n- Cross-reload item identity with `--id-nth`\n - Added `--id-nth=NTH` to define ite"
},
{
"path": "Dockerfile",
"chars": 512,
"preview": "FROM rubylang/ruby:3.4.1-noble\nRUN apt-get update -y && apt install -y git make golang zsh fish tmux\nRUN gem install --n"
},
{
"path": "Gemfile",
"chars": 180,
"preview": "# frozen_string_literal: true\n\nsource 'https://rubygems.org'\n\ngem 'minitest', '5.25.4'\ngem 'rubocop', '1.71.0'\ngem 'rubo"
},
{
"path": "LICENSE",
"chars": 1085,
"preview": "The MIT License (MIT)\n\nCopyright (c) 2013-2026 Junegunn Choi\n\nPermission is hereby granted, free of charge, to any perso"
},
{
"path": "Makefile",
"chars": 5880,
"preview": "GO ?= go\nDOCKER ?= docker\nGOOS ?= $(shell $(GO) env GOOS)\n\nMAKEFILE := $(realpath $("
},
{
"path": "README-VIM.md",
"chars": 17933,
"preview": "FZF Vim integration\n===================\n\nInstallation\n------------\n\nOnce you have fzf installed, you can enable it insid"
},
{
"path": "README.md",
"chars": 47463,
"preview": "<div align=\"center\">\n <img src=\"https://raw.githubusercontent.com/junegunn/i/master/fzf-color.png\" alt=\"fzf - a command"
},
{
"path": "SECURITY.md",
"chars": 1274,
"preview": "# Security Reporting\n\nIf you wish to report a security vulnerability privately, we appreciate your diligence. Please fol"
},
{
"path": "bin/fzf-preview.sh",
"chars": 2868,
"preview": "#!/usr/bin/env bash\n#\n# The purpose of this script is to demonstrate how to preview a file or an\n# image in the preview "
},
{
"path": "bin/fzf-tmux",
"chars": 7316,
"preview": "#!/usr/bin/env bash\n# fzf-tmux: starts fzf in a tmux pane\n# usage: fzf-tmux [LAYOUT OPTIONS] [--] [FZF OPTIONS]\n\nfail() "
},
{
"path": "doc/fzf.txt",
"chars": 21577,
"preview": "fzf.txt\tfzf\tLast change: February 15 2024\nFZF - TABLE OF CONTENTS *fzf* *fzf-"
},
{
"path": "go.mod",
"chars": 529,
"preview": "module github.com/junegunn/fzf\n\nrequire (\n\tgithub.com/charlievieth/fastwalk v1.0.14\n\tgithub.com/gdamore/tcell/v2 v2.9.0\n"
},
{
"path": "go.sum",
"chars": 5100,
"preview": "github.com/charlievieth/fastwalk v1.0.14 h1:3Eh5uaFGwHZd8EGwTjJnSpBkfwfsak9h6ICgnWlhAyg=\ngithub.com/charlievieth/fastwal"
},
{
"path": "install",
"chars": 12669,
"preview": "#!/usr/bin/env bash\n\nset -u\n\nversion=0.70.0\nauto_completion=\nkey_bindings=\nupdate_config=2\nshells=\"bash zsh fish\"\nprefix"
},
{
"path": "install.ps1",
"chars": 1882,
"preview": "$version=\"0.70.0\"\n\n$fzf_base=Split-Path -Parent $MyInvocation.MyCommand.Definition\n\nfunction check_binary () {\n Write-H"
},
{
"path": "main.go",
"chars": 2046,
"preview": "package main\n\nimport (\n\t_ \"embed\"\n\t\"fmt\"\n\t\"os\"\n\t\"os/exec\"\n\t\"strings\"\n\n\tfzf \"github.com/junegunn/fzf/src\"\n\t\"github.com/ju"
},
{
"path": "man/man1/fzf-tmux.1",
"chars": 2022,
"preview": ".ig\nThe MIT License (MIT)\n\nCopyright (c) 2013-2026 Junegunn Choi\n\nPermission is hereby granted, free of charge, to any p"
},
{
"path": "man/man1/fzf.1",
"chars": 78533,
"preview": ".ig\nThe MIT License (MIT)\n\nCopyright (c) 2013-2026 Junegunn Choi\n\nPermission is hereby granted, free of charge, to any p"
},
{
"path": "plugin/fzf.vim",
"chars": 33228,
"preview": "\" Copyright (c) 2013-2026 Junegunn Choi\n\"\n\" MIT License\n\"\n\" Permission is hereby granted, free of charge, to any person "
},
{
"path": "shell/common.fish",
"chars": 5907,
"preview": " function __fzf_defaults\n # $argv[1]: Prepend to FZF_DEFAULT_OPTS_FILE and FZF_DEFAULT_OPTS\n # $argv[2..]: Append"
},
{
"path": "shell/common.sh",
"chars": 1867,
"preview": "__fzf_defaults() {\n # $1: Prepend to FZF_DEFAULT_OPTS_FILE and FZF_DEFAULT_OPTS\n # $2: Append to FZF_DEFAULT_OPTS_FILE"
},
{
"path": "shell/completion.bash",
"chars": 21770,
"preview": "# ____ ____\n# / __/___ / __/\n# / /_/_ / / /_\n# / __/ / /_/ __/\n# /_/ /___/_/ completion.bash\n#\n# - $F"
},
{
"path": "shell/completion.fish",
"chars": 9301,
"preview": "# ____ ____\n# / __/___ / __/\n# / /_/_ / / /_\n# / __/ / /_/ __/\n# /_/ /___/_/ completion.fish\n#\n# - $F"
},
{
"path": "shell/completion.zsh",
"chars": 16428,
"preview": "# ____ ____\n# / __/___ / __/\n# / /_/_ / / /_\n# / __/ / /_/ __/\n# /_/ /___/_/ completion.zsh\n#\n# - $FZ"
},
{
"path": "shell/key-bindings.bash",
"chars": 6572,
"preview": "# ____ ____\n# / __/___ / __/\n# / /_/_ / / /_\n# / __/ / /_/ __/\n# /_/ /___/_/ key-bindings.bash\n#\n# - "
},
{
"path": "shell/key-bindings.fish",
"chars": 11128,
"preview": "# ____ ____\n# / __/___ / __/\n# / /_/_ / / /_\n# / __/ / /_/ __/\n# /_/ /___/_/ key-bindings.fish\n#\n# - "
},
{
"path": "shell/key-bindings.zsh",
"chars": 7188,
"preview": "# ____ ____\n# / __/___ / __/\n# / /_/_ / / /_\n# / __/ / /_/ __/\n# /_/ /___/_/ key-bindings.zsh\n#\n# - $"
},
{
"path": "shell/update.sh",
"chars": 1580,
"preview": "#!/usr/bin/env bash\n\n# This script applies the contents of \"common.sh\" to the other files.\n\nset -e\n\ndir=${0%\"${0##*/}\"}\n"
},
{
"path": "src/LICENSE",
"chars": 1085,
"preview": "The MIT License (MIT)\n\nCopyright (c) 2013-2026 Junegunn Choi\n\nPermission is hereby granted, free of charge, to any perso"
},
{
"path": "src/actiontype_string.go",
"chars": 9086,
"preview": "// Code generated by \"stringer -type=actionType\"; DO NOT EDIT.\n\npackage fzf\n\nimport \"strconv\"\n\nfunc _() {\n\t// An \"invali"
},
{
"path": "src/algo/SIMD.md",
"chars": 4447,
"preview": "# SIMD byte search: `indexByteTwo` / `lastIndexByteTwo`\n\n## What these functions do\n\n`indexByteTwo(s []byte, b1, b2 byte"
},
{
"path": "src/algo/algo.go",
"chars": 28228,
"preview": "package algo\n\n/*\n\nAlgorithm\n---------\n\nFuzzyMatchV1 finds the first \"fuzzy\" occurrence of the pattern within the given\nt"
},
{
"path": "src/algo/algo_test.go",
"chars": 9146,
"preview": "package algo\n\nimport (\n\t\"math\"\n\t\"sort\"\n\t\"strings\"\n\t\"testing\"\n\n\t\"github.com/junegunn/fzf/src/util\"\n)\n\nfunc init() {\n\tInit"
},
{
"path": "src/algo/indexbyte2_amd64.go",
"chars": 563,
"preview": "//go:build amd64\n\npackage algo\n\nvar _useAVX2 bool\n\nfunc init() {\n\t_useAVX2 = cpuHasAVX2()\n}\n\n//go:noescape\nfunc cpuHasAV"
},
{
"path": "src/algo/indexbyte2_amd64.s",
"chars": 6419,
"preview": "#include \"textflag.h\"\n\n// func cpuHasAVX2() bool\n//\n// Checks CPUID and XGETBV for AVX2 + OS YMM support.\nTEXT ·cpuHasAV"
},
{
"path": "src/algo/indexbyte2_arm64.go",
"chars": 531,
"preview": "//go:build arm64\n\npackage algo\n\n// indexByteTwo returns the index of the first occurrence of b1 or b2 in s,\n// or -1 if "
},
{
"path": "src/algo/indexbyte2_arm64.s",
"chars": 6327,
"preview": "#include \"textflag.h\"\n\n// func IndexByteTwo(s []byte, b1, b2 byte) int\n//\n// Returns the index of the first occurrence o"
},
{
"path": "src/algo/indexbyte2_other.go",
"chars": 656,
"preview": "//go:build !arm64 && !amd64\n\npackage algo\n\nimport \"bytes\"\n\n// indexByteTwo returns the index of the first occurrence of "
},
{
"path": "src/algo/indexbyte2_test.go",
"chars": 7045,
"preview": "package algo\n\nimport (\n\t\"bytes\"\n\t\"testing\"\n)\n\nfunc TestIndexByteTwo(t *testing.T) {\n\ttests := []struct {\n\t\tname string\n\t"
},
{
"path": "src/algo/normalize.go",
"chars": 23870,
"preview": "// Normalization of latin script letters\n// Reference: http://www.unicode.org/Public/UCD/latest/ucd/Index.txt\n\npackage a"
},
{
"path": "src/ansi.go",
"chars": 13381,
"preview": "package fzf\n\nimport (\n\t\"fmt\"\n\t\"strconv\"\n\t\"strings\"\n\t\"unicode/utf8\"\n\n\t\"github.com/junegunn/fzf/src/algo\"\n\t\"github.com/jun"
},
{
"path": "src/ansi_test.go",
"chars": 15071,
"preview": "package fzf\n\nimport (\n\t\"math/rand\"\n\t\"regexp\"\n\t\"strings\"\n\t\"testing\"\n\t\"unicode/utf8\"\n\n\t\"github.com/junegunn/fzf/src/tui\"\n)"
},
{
"path": "src/cache.go",
"chars": 2103,
"preview": "package fzf\n\nimport \"sync\"\n\n// ChunkBitmap is a bitmap with one bit per item in a chunk.\ntype ChunkBitmap [chunkBitWords"
},
{
"path": "src/cache_test.go",
"chars": 847,
"preview": "package fzf\n\nimport \"testing\"\n\nfunc TestChunkCache(t *testing.T) {\n\tcache := NewChunkCache()\n\tchunk1p := &Chunk{}\n\tchunk"
},
{
"path": "src/chunklist.go",
"chars": 3737,
"preview": "package fzf\n\nimport \"sync\"\n\n// Chunk is a list of Items whose size has the upper limit of chunkSize\ntype Chunk struct {\n"
},
{
"path": "src/chunklist_test.go",
"chars": 2830,
"preview": "package fzf\n\nimport (\n\t\"fmt\"\n\t\"testing\"\n\n\t\"github.com/junegunn/fzf/src/util\"\n)\n\nfunc TestChunkList(t *testing.T) {\n\t// F"
},
{
"path": "src/constants.go",
"chars": 1765,
"preview": "package fzf\n\nimport (\n\t\"math\"\n\t\"time\"\n\n\t\"github.com/junegunn/fzf/src/util\"\n)\n\nconst (\n\t// Core\n\tcoordinatorDelayMax tim"
},
{
"path": "src/core.go",
"chars": 17037,
"preview": "// Package fzf implements fzf, a command-line fuzzy finder.\npackage fzf\n\nimport (\n\t\"fmt\"\n\t\"maps\"\n\t\"os\"\n\t\"sync\"\n\t\"time\"\n\n"
},
{
"path": "src/functions.go",
"chars": 675,
"preview": "package fzf\n\nimport (\n\t\"os\"\n\t\"strings\"\n\t\"unsafe\"\n)\n\nfunc WriteTemporaryFile(data []string, printSep string) string {\n\tf,"
},
{
"path": "src/history.go",
"chars": 2071,
"preview": "package fzf\n\nimport (\n\t\"errors\"\n\t\"os\"\n\t\"strings\"\n)\n\n// History struct represents input history\ntype History struct {\n\tpa"
},
{
"path": "src/history_test.go",
"chars": 1501,
"preview": "package fzf\n\nimport (\n\t\"os\"\n\t\"runtime\"\n\t\"testing\"\n)\n\nfunc TestHistory(t *testing.T) {\n\tmaxHistory := 50\n\n\t// Invalid arg"
},
{
"path": "src/item.go",
"chars": 1455,
"preview": "package fzf\n\nimport (\n\t\"math\"\n\n\t\"github.com/junegunn/fzf/src/util\"\n)\n\ntype transformed struct {\n\t// Because nth can be c"
},
{
"path": "src/item_test.go",
"chars": 484,
"preview": "package fzf\n\nimport (\n\t\"testing\"\n\n\t\"github.com/junegunn/fzf/src/util\"\n)\n\nfunc TestStringPtr(t *testing.T) {\n\torig := []b"
},
{
"path": "src/matcher.go",
"chars": 6458,
"preview": "package fzf\n\nimport (\n\t\"fmt\"\n\t\"runtime\"\n\t\"sync\"\n\t\"sync/atomic\"\n\t\"time\"\n\n\t\"github.com/junegunn/fzf/src/util\"\n)\n\n// MatchR"
},
{
"path": "src/merger.go",
"chars": 4200,
"preview": "package fzf\n\nimport \"fmt\"\n\n// EmptyMerger is a Merger with no data\nfunc EmptyMerger(revision revision) *Merger {\n\treturn"
},
{
"path": "src/merger_test.go",
"chars": 2494,
"preview": "package fzf\n\nimport (\n\t\"fmt\"\n\t\"math/rand\"\n\t\"sort\"\n\t\"testing\"\n\n\t\"github.com/junegunn/fzf/src/util\"\n)\n\nfunc assert(t *test"
},
{
"path": "src/options.go",
"chars": 108196,
"preview": "package fzf\n\nimport (\n\t\"errors\"\n\t\"fmt\"\n\t\"maps\"\n\t\"os\"\n\t\"regexp\"\n\t\"strconv\"\n\t\"strings\"\n\t\"time\"\n\t\"unicode\"\n\n\t\"github.com/ju"
},
{
"path": "src/options_no_pprof.go",
"chars": 332,
"preview": "//go:build !pprof\n// +build !pprof\n\npackage fzf\n\nimport \"errors\"\n\nfunc (o *Options) initProfiling() error {\n\tif o.CPUPro"
},
{
"path": "src/options_pprof.go",
"chars": 1628,
"preview": "//go:build pprof\n// +build pprof\n\npackage fzf\n\nimport (\n\t\"fmt\"\n\t\"os\"\n\t\"runtime\"\n\t\"runtime/pprof\"\n\n\t\"github.com/junegunn/"
},
{
"path": "src/options_pprof_test.go",
"chars": 2069,
"preview": "//go:build pprof\n// +build pprof\n\npackage fzf\n\nimport (\n\t\"bytes\"\n\t\"flag\"\n\t\"os\"\n\t\"os/exec\"\n\t\"path/filepath\"\n\t\"testing\"\n\n\t"
},
{
"path": "src/options_test.go",
"chars": 17299,
"preview": "package fzf\n\nimport (\n\t\"fmt\"\n\t\"os\"\n\t\"testing\"\n\n\t\"github.com/junegunn/fzf/src/tui\"\n)\n\nfunc TestDelimiterRegex(t *testing."
},
{
"path": "src/pattern.go",
"chars": 13554,
"preview": "package fzf\n\nimport (\n\t\"fmt\"\n\t\"regexp\"\n\t\"strings\"\n\n\t\"github.com/junegunn/fzf/src/algo\"\n\t\"github.com/junegunn/fzf/src/uti"
},
{
"path": "src/pattern_test.go",
"chars": 11584,
"preview": "package fzf\n\nimport (\n\t\"reflect\"\n\t\"runtime\"\n\t\"testing\"\n\n\t\"github.com/junegunn/fzf/src/algo\"\n\t\"github.com/junegunn/fzf/sr"
},
{
"path": "src/protector/protector.go",
"chars": 122,
"preview": "//go:build !openbsd\n\npackage protector\n\n// Protect calls OS specific protections like pledge on OpenBSD\nfunc Protect() {"
},
{
"path": "src/protector/protector_openbsd.go",
"chars": 238,
"preview": "//go:build openbsd\n\npackage protector\n\nimport \"golang.org/x/sys/unix\"\n\n// Protect calls OS specific protections like ple"
},
{
"path": "src/proxy.go",
"chars": 4155,
"preview": "package fzf\n\nimport (\n\t\"bufio\"\n\t\"errors\"\n\t\"fmt\"\n\t\"io\"\n\t\"os\"\n\t\"os/exec\"\n\t\"os/signal\"\n\t\"path/filepath\"\n\t\"regexp\"\n\t\"strings"
},
{
"path": "src/proxy_unix.go",
"chars": 690,
"preview": "//go:build !windows\n\npackage fzf\n\nimport (\n\t\"io\"\n\t\"os\"\n\n\t\"golang.org/x/sys/unix\"\n)\n\nfunc sh(bash bool) (string, error) {"
},
{
"path": "src/proxy_windows.go",
"chars": 1558,
"preview": "//go:build windows\n\npackage fzf\n\nimport (\n\t\"fmt\"\n\t\"io\"\n\t\"os/exec\"\n\t\"strconv\"\n\t\"strings\"\n\t\"sync/atomic\"\n)\n\nvar shPath ato"
},
{
"path": "src/reader.go",
"chars": 9679,
"preview": "package fzf\n\nimport (\n\t\"bytes\"\n\t\"context\"\n\t\"io\"\n\t\"io/fs\"\n\t\"os\"\n\t\"path/filepath\"\n\t\"slices\"\n\t\"strings\"\n\t\"sync\"\n\t\"sync/atom"
},
{
"path": "src/reader_test.go",
"chars": 1409,
"preview": "package fzf\n\nimport (\n\t\"testing\"\n\t\"time\"\n\n\t\"github.com/junegunn/fzf/src/util\"\n)\n\nfunc TestReadFromCommand(t *testing.T) "
},
{
"path": "src/result.go",
"chars": 10009,
"preview": "package fzf\n\nimport (\n\t\"math\"\n\t\"sort\"\n\t\"unicode\"\n\n\t\"github.com/junegunn/fzf/src/tui\"\n\t\"github.com/junegunn/fzf/src/util\""
},
{
"path": "src/result_others.go",
"chars": 490,
"preview": "//go:build !386 && !amd64 && !arm64\n\npackage fzf\n\nfunc compareRanks(irank Result, jrank Result, tac bool) bool {\n\tfor id"
},
{
"path": "src/result_test.go",
"chars": 9657,
"preview": "package fzf\n\nimport (\n\t\"math\"\n\t\"math/rand\"\n\t\"sort\"\n\t\"testing\"\n\n\t\"github.com/junegunn/fzf/src/tui\"\n\t\"github.com/junegunn/"
},
{
"path": "src/result_x86.go",
"chars": 458,
"preview": "//go:build 386 || amd64 || arm64\n\npackage fzf\n\nimport \"unsafe\"\n\nfunc compareRanks(irank Result, jrank Result, tac bool) "
},
{
"path": "src/server.go",
"chars": 6908,
"preview": "package fzf\n\nimport (\n\t\"bufio\"\n\t\"bytes\"\n\t\"crypto/subtle\"\n\t\"errors\"\n\t\"fmt\"\n\t\"net\"\n\t\"os\"\n\t\"regexp\"\n\t\"strconv\"\n\t\"strings\"\n\t"
},
{
"path": "src/terminal.go",
"chars": 216750,
"preview": "package fzf\n\nimport (\n\t\"bufio\"\n\t\"context\"\n\t\"encoding/json\"\n\t\"fmt\"\n\t\"io\"\n\t\"maps\"\n\t\"math\"\n\t\"net\"\n\t\"os\"\n\t\"os/exec\"\n\t\"os/sig"
},
{
"path": "src/terminal_test.go",
"chars": 31792,
"preview": "package fzf\n\nimport (\n\t\"bytes\"\n\t\"io\"\n\t\"os\"\n\t\"regexp\"\n\t\"strings\"\n\t\"testing\"\n\t\"text/template\"\n\n\t\"github.com/junegunn/fzf/s"
},
{
"path": "src/terminal_unix.go",
"chars": 353,
"preview": "//go:build !windows\n\npackage fzf\n\nimport (\n\t\"os\"\n\t\"os/signal\"\n\t\"syscall\"\n\n\t\"golang.org/x/sys/unix\"\n)\n\nfunc notifyOnResiz"
},
{
"path": "src/terminal_windows.go",
"chars": 158,
"preview": "//go:build windows\n\npackage fzf\n\nimport (\n\t\"os\"\n)\n\nfunc notifyOnResize(resizeChan chan<- os.Signal) {\n\t// TODO\n}\n\nfunc n"
},
{
"path": "src/tmux.go",
"chars": 2127,
"preview": "package fzf\n\nimport (\n\t\"os\"\n\t\"os/exec\"\n\n\t\"github.com/junegunn/fzf/src/tui\"\n)\n\nfunc runTmux(args []string, opts *Options)"
},
{
"path": "src/tokenizer.go",
"chars": 7569,
"preview": "package fzf\n\nimport (\n\t\"bytes\"\n\t\"fmt\"\n\t\"regexp\"\n\t\"strconv\"\n\t\"strings\"\n\t\"unicode\"\n\n\t\"github.com/junegunn/fzf/src/util\"\n)\n"
},
{
"path": "src/tokenizer_test.go",
"chars": 3055,
"preview": "package fzf\n\nimport (\n\t\"testing\"\n)\n\nfunc TestParseRange(t *testing.T) {\n\t{\n\t\ti := \"..\"\n\t\tr, _ := ParseRange(&i)\n\t\tif r.b"
},
{
"path": "src/tui/dummy.go",
"chars": 2091,
"preview": "//go:build !tcell && !windows\n\npackage tui\n\nconst (\n\tBold = Attr(1)\n\tDim = Attr(1 << 1)\n\tItalic "
},
{
"path": "src/tui/eventtype_string.go",
"chars": 5911,
"preview": "// Code generated by \"stringer -type=EventType\"; DO NOT EDIT.\n\npackage tui\n\nimport \"strconv\"\n\nfunc _() {\n\t// An \"invalid"
},
{
"path": "src/tui/light.go",
"chars": 34763,
"preview": "package tui\n\nimport (\n\t\"bytes\"\n\t\"errors\"\n\t\"fmt\"\n\t\"os\"\n\t\"regexp\"\n\t\"strconv\"\n\t\"strings\"\n\t\"sync\"\n\t\"time\"\n\t\"unicode/utf8\"\n\n\t"
},
{
"path": "src/tui/light_test.go",
"chars": 12922,
"preview": "package tui\n\nimport (\n\t\"fmt\"\n\t\"os\"\n\t\"testing\"\n\t\"unicode\"\n)\n\nfunc TestLightRenderer(t *testing.T) {\n\ttty_file, _ := os.Op"
},
{
"path": "src/tui/light_unix.go",
"chars": 3885,
"preview": "//go:build !windows\n\npackage tui\n\nimport (\n\t\"errors\"\n\t\"os\"\n\t\"os/exec\"\n\t\"strings\"\n\t\"syscall\"\n\n\t\"github.com/junegunn/fzf/s"
},
{
"path": "src/tui/light_windows.go",
"chars": 5628,
"preview": "//go:build windows\n\npackage tui\n\nimport (\n\t\"os\"\n\t\"syscall\"\n\t\"time\"\n\n\t\"github.com/junegunn/fzf/src/util\"\n\t\"golang.org/x/s"
},
{
"path": "src/tui/tcell.go",
"chars": 25433,
"preview": "//go:build tcell || windows\n\npackage tui\n\nimport (\n\t\"os\"\n\t\"regexp\"\n\t\"strings\"\n\t\"time\"\n\n\t\"github.com/gdamore/tcell/v2\"\n\t\""
},
{
"path": "src/tui/tcell_test.go",
"chars": 23818,
"preview": "//go:build tcell || windows\n\npackage tui\n\nimport (\n\t\"os\"\n\t\"testing\"\n\n\t\"github.com/gdamore/tcell/v2\"\n\t\"github.com/junegun"
},
{
"path": "src/tui/ttyname_unix.go",
"chars": 978,
"preview": "//go:build !windows\n\npackage tui\n\nimport (\n\t\"os\"\n\t\"sync/atomic\"\n\t\"syscall\"\n)\n\nvar devPrefixes = [...]string{\"/dev/pts/\","
},
{
"path": "src/tui/ttyname_windows.go",
"chars": 304,
"preview": "//go:build windows\n\npackage tui\n\nimport (\n\t\"os\"\n)\n\nfunc ttyname() string {\n\treturn \"\"\n}\n\n// TtyIn on Windows returns os."
},
{
"path": "src/tui/tui.go",
"chars": 33985,
"preview": "package tui\n\nimport (\n\t\"strconv\"\n\t\"strings\"\n\t\"time\"\n\n\t\"github.com/junegunn/fzf/src/util\"\n\t\"github.com/rivo/uniseg\"\n)\n\nty"
},
{
"path": "src/tui/tui_test.go",
"chars": 1636,
"preview": "package tui\n\nimport \"testing\"\n\nfunc TestWrapLine(t *testing.T) {\n\t// Basic wrapping\n\tlines := WrapLine(\"hello world\", 0,"
},
{
"path": "src/util/atexit.go",
"chars": 554,
"preview": "package util\n\nimport (\n\t\"sync\"\n)\n\nvar atExitFuncs []func()\n\n// AtExit registers the function fn to be called on program "
},
{
"path": "src/util/atexit_test.go",
"chars": 446,
"preview": "package util\n\nimport (\n\t\"reflect\"\n\t\"testing\"\n)\n\nfunc TestAtExit(t *testing.T) {\n\twant := []int{3, 2, 1, 0}\n\tvar called ["
},
{
"path": "src/util/atomicbool.go",
"chars": 748,
"preview": "package util\n\nimport (\n\t\"sync/atomic\"\n)\n\nfunc convertBoolToInt32(b bool) int32 {\n\tif b {\n\t\treturn 1\n\t}\n\treturn 0\n}\n\n// A"
},
{
"path": "src/util/atomicbool_test.go",
"chars": 301,
"preview": "package util\n\nimport \"testing\"\n\nfunc TestAtomicBool(t *testing.T) {\n\tif !NewAtomicBool(true).Get() || NewAtomicBool(fals"
},
{
"path": "src/util/chars.go",
"chars": 7223,
"preview": "package util\n\nimport (\n\t\"bytes\"\n\t\"fmt\"\n\t\"unicode\"\n\t\"unicode/utf8\"\n\t\"unsafe\"\n)\n\nconst (\n\toverflow64 uint64 = 0x8080808080"
},
{
"path": "src/util/chars_test.go",
"chars": 4196,
"preview": "package util\n\nimport (\n\t\"fmt\"\n\t\"testing\"\n)\n\nfunc TestToCharsAscii(t *testing.T) {\n\tchars := ToChars([]byte(\"foobar\"))\n\ti"
},
{
"path": "src/util/concurrent_set.go",
"chars": 851,
"preview": "package util\n\nimport \"sync\"\n\n// ConcurrentSet is a thread-safe set implementation.\ntype ConcurrentSet[T comparable] stru"
},
{
"path": "src/util/eventbox.go",
"chars": 1960,
"preview": "package util\n\nimport \"sync\"\n\n// EventType is the type for fzf events\ntype EventType int\n\n// Events is a type that associ"
},
{
"path": "src/util/eventbox_test.go",
"chars": 899,
"preview": "package util\n\nimport \"testing\"\n\n// fzf events\nconst (\n\tEvtReadNew EventType = iota\n\tEvtReadFin\n\tEvtSearchNew\n\tEvtSearchP"
},
{
"path": "src/util/slab.go",
"chars": 185,
"preview": "package util\n\ntype Slab struct {\n\tI16 []int16\n\tI32 []int32\n}\n\nfunc MakeSlab(size16 int, size32 int) *Slab {\n\treturn &Sla"
},
{
"path": "src/util/util.go",
"chars": 3290,
"preview": "package util\n\nimport (\n\t\"cmp\"\n\t\"math\"\n\t\"os\"\n\t\"strconv\"\n\t\"strings\"\n\n\t\"github.com/mattn/go-isatty\"\n\t\"github.com/rivo/unise"
},
{
"path": "src/util/util_test.go",
"chars": 3058,
"preview": "package util\n\nimport (\n\t\"math\"\n\t\"strings\"\n\t\"testing\"\n)\n\nfunc TestConstrain(t *testing.T) {\n\tif Constrain(-3, -1, 3) != -"
},
{
"path": "src/util/util_unix.go",
"chars": 2287,
"preview": "//go:build !windows\n\npackage util\n\nimport (\n\t\"fmt\"\n\t\"os\"\n\t\"os/exec\"\n\t\"strings\"\n\t\"syscall\"\n\n\t\"github.com/junegunn/go-shel"
},
{
"path": "src/util/util_windows.go",
"chars": 4873,
"preview": "//go:build windows\n\npackage util\n\nimport (\n\t\"fmt\"\n\t\"os\"\n\t\"os/exec\"\n\t\"path/filepath\"\n\t\"regexp\"\n\t\"strings\"\n\t\"sync/atomic\"\n"
},
{
"path": "src/winpty.go",
"chars": 206,
"preview": "//go:build !windows\n\npackage fzf\n\nimport \"errors\"\n\nfunc needWinpty(_ *Options) bool {\n\treturn false\n}\n\nfunc runWinpty(_ "
},
{
"path": "src/winpty_windows.go",
"chars": 1781,
"preview": "//go:build windows\n\npackage fzf\n\nimport (\n\t\"fmt\"\n\t\"os\"\n\t\"os/exec\"\n\t\"strings\"\n\n\t\"github.com/junegunn/fzf/src/util\"\n)\n\nfun"
},
{
"path": "test/lib/common.fish",
"chars": 620,
"preview": "# Unset fzf variables\nset -e FZF_DEFAULT_COMMAND FZF_DEFAULT_OPTS FZF_DEFAULT_OPTS_FILE FZF_TMUX FZF_TMUX_OPTS\nset -e FZ"
},
{
"path": "test/lib/common.rb",
"chars": 5550,
"preview": "# frozen_string_literal: true\n\nrequire 'bundler/setup'\nrequire 'minitest/autorun'\nrequire 'fileutils'\nrequire 'English'\n"
},
{
"path": "test/lib/common.sh",
"chars": 1281,
"preview": "set -u\nPS1= PROMPT_COMMAND= HISTFILE= HISTSIZE=100\nunset <%= UNSETS.join(' ') %>\nunset $(env | sed -n /^_fzf_orig/s/=.*/"
},
{
"path": "test/runner.rb",
"chars": 116,
"preview": "# frozen_string_literal: true\n\nDir[File.join(__dir__, 'test_*.rb')].each { require it }\n\nrequire 'minitest/autorun'\n"
},
{
"path": "test/test_core.rb",
"chars": 98536,
"preview": "# frozen_string_literal: true\n\nrequire_relative 'lib/common'\n\n# Testing basic features of fzf\nclass TestCore < TestInter"
},
{
"path": "test/test_exec.rb",
"chars": 15463,
"preview": "# frozen_string_literal: true\n\nrequire_relative 'lib/common'\n\n# Process execution: execute, become, reload\nclass TestExe"
},
{
"path": "test/test_filter.rb",
"chars": 10457,
"preview": "# frozen_string_literal: true\n\nrequire_relative 'lib/common'\n\n# Non-interactive tests\nclass TestFilter < TestBase\n def "
},
{
"path": "test/test_layout.rb",
"chars": 42561,
"preview": "# frozen_string_literal: true\n\nrequire_relative 'lib/common'\n\n# Test cases that mainly use assert_block to verify the la"
},
{
"path": "test/test_preview.rb",
"chars": 25000,
"preview": "# frozen_string_literal: true\n\nrequire_relative 'lib/common'\n\n# Test cases for preview\nclass TestPreview < TestInteracti"
},
{
"path": "test/test_raw.rb",
"chars": 2746,
"preview": "# frozen_string_literal: true\n\nrequire_relative 'lib/common'\n\n# Testing raw mode\nclass TestRaw < TestInteractive\n def t"
},
{
"path": "test/test_server.rb",
"chars": 2529,
"preview": "# frozen_string_literal: true\n\nrequire_relative 'lib/common'\n\n# Test cases for API server\nclass TestServer < TestInterac"
},
{
"path": "test/test_shell_integration.rb",
"chars": 33296,
"preview": "# frozen_string_literal: true\n\nrequire_relative 'lib/common'\n\n# Testing shell integration\nmodule TestShell\n attr_reader"
},
{
"path": "test/vim/fzf.vader",
"chars": 5829,
"preview": "Execute (Setup):\n let g:dir = fnamemodify(g:vader_file, ':p:h')\n unlet! g:fzf_layout g:fzf_action g:fzf_history_dir\n "
},
{
"path": "typos.toml",
"chars": 235,
"preview": "# See https://github.com/crate-ci/typos/blob/master/docs/reference.md to configure typos\n[default.extend-words]\nba = \"ba"
},
{
"path": "uninstall",
"chars": 2760,
"preview": "#!/usr/bin/env bash\n\nxdg=0\nprefix='~/.fzf'\nprefix_expand=~/.fzf\nfish_dir=${XDG_CONFIG_HOME:-$HOME/.config}/fish\n\nhelp() "
}
]
About this extraction
This page contains the full source code of the junegunn/fzf GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 144 files (1.5 MB), approximately 484.4k tokens, and a symbol index with 1998 extracted functions, classes, methods, constants, and types. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.
Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.