Bump actions/labeler from 5 to 6 (#4700)
Bumps actions/labeler from 5 to 6.
updated-dependencies:
- dependency-name: actions/labeler dependency-version: ‘6’ dependency-type: direct:production update-type: version-update:semver-major …
Signed-off-by: dependabot[bot] support@github.com Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
fzf is a general-purpose command-line fuzzy finder.
It’s an interactive filter program for any kind of list; files, command history, processes, hostnames, bookmarks, git commits, etc. It implements a “fuzzy” matching algorithm, so you can quickly type in patterns with omitted characters and still get the results you want.
Highlights
Table of Contents
--heightmode--tmuxmode.gitignoreInstallation
Using Homebrew
You can use Homebrew (on macOS or Linux) to install fzf.
fzf is also available via MacPorts:
sudo port install fzfUsing Mise
You can use mise to install fzf.
Linux packages
sudo apk add fzfsudo apt install fzfconda install -c conda-forge fzfsudo dnf install fzfnix-env -iA nixpkgs.fzfsudo pacman -S fzfpkg install fzfpkgin install fzfpkg_add fzfemerge --ask app-shells/fzfspack install fzfsudo xbps-install -S fzfsudo zypper install fzfWindows packages
On Windows, fzf is available via Chocolatey, Scoop, Winget, and MSYS2:
choco install fzfscoop install fzfwinget install fzfpacman -S $MINGW_PACKAGE_PREFIX-fzfUsing git
Alternatively, you can “git clone” this repository to any directory and run install script.
The install script will add lines to your shell configuration file to modify
$PATHand set up shell integration.Binary releases
You can download the official fzf binaries from the releases page.
Setting up shell integration
Add the following line to your shell configuration file.
Vim/Neovim plugin
If you use vim-plug, add this to your Vim configuration file:
junegunn/fzfprovides the basic library functionsfzf#install()makes sure that you have the latest binaryjunegunn/fzf.vimis a separate project that provides a variety of useful commandsTo learn more about the Vim integration, see README-VIM.md.
Upgrading fzf
fzf is being actively developed, and you might want to upgrade it once in a while. Please follow the instruction below depending on the installation method used.
cd ~/.fzf && git pull && ./installbrew update; brew upgrade fzfsudo port upgrade fzfchoco upgrade fzf:PlugUpdate fzfBuilding fzf
See BUILD.md.
Usage
fzf will launch interactive finder, read the list from STDIN, and write the selected item to STDOUT.
Without STDIN pipe, fzf will traverse the file system under the current directory to get the list of files.
Using the finder
CTRL-K/CTRL-J(orCTRL-P/CTRL-N) to move cursor up and downEnterkey to select the item,CTRL-C/CTRL-G/ESCto exit-m),TABandShift-TABto mark multiple itemsDisplay modes
fzf by default runs in fullscreen mode, but there are other display modes.
--heightmodeWith
--height HEIGHT[%], fzf will start below the cursor with the given height.reverselayout and--bordergoes well with this option.By prepending
~to the height, you’re setting the maximum height.Height value can be a negative number.
--tmuxmodeWith
--tmuxoption, fzf will start in a tmux popup.--tmuxis silently ignored when you’re not on tmux.Search syntax
Unless otherwise specified, fzf starts in “extended-search mode” where you can type in multiple search terms delimited by spaces. e.g.
^music .mp3$ sbtrkt !firesbtrktsbtrkt'wildwild'wild'wildat word boundaries^musicmusic.mp3$.mp3!firefire!^musicmusic!.mp3$.mp3If you don’t prefer fuzzy matching and do not wish to “quote” every word, start fzf with
-eor--exactoption. Note that when--exactis set,'-prefix “unquotes” the term.A single bar character term acts as an OR operator. For example, the following query matches entries that start with
coreand end with eithergo,rb, orpy.Environment variables
FZF_DEFAULT_COMMANDexport FZF_DEFAULT_COMMAND='fd --type f'FZF_DEFAULT_OPTSexport FZF_DEFAULT_OPTS="--layout=reverse --inline-info"FZF_DEFAULT_OPTS_FILEexport FZF_DEFAULT_OPTS_FILE=~/.fzfrcCustomizing the look
The user interface of fzf is fully customizable with a large number of configuration options. For a quick setup, you can start with one of the style presets —
default,full, orminimal— using the--styleoption.defaultfullminimalHere’s an example based on the
fullpreset:Options
See the man page (
fzf --manorman fzf) for the full list of options.Demo
If you learn by watching videos, check out this screencast by @samoshkin to explore
fzffeatures.Examples
Key bindings for command-line
By setting up shell integration, you can use the following key bindings in bash, zsh, and fish.
CTRL-T- Paste the selected files and directories onto the command-line--walker file,dir,follow,hiddenoptionFZF_CTRL_T_COMMANDto a custom command that generates the desired list--walker*options inFZF_CTRL_T_OPTSFZF_CTRL_T_OPTSto pass additional options to fzfFZF_CTRL_T_COMMANDto an empty string when sourcing the scriptCTRL-R- Paste the selected command from history onto the command-lineCTRL-Ragain which toggles sorting by relevanceALT-Rto toggle “raw” mode where you can see the surrounding items of a match. In this mode, you can pressCTRL-NandCTRL-Pto move between the matching items only.CTRL-/orALT-/to toggle line wrappingFZF_CTRL_R_OPTSto pass additional options to fzfFZF_CTRL_R_COMMANDto an empty string when sourcing the scriptFZF_CTRL_R_COMMANDis not yet supported and will emit a warningALT-C- cd into the selected directory--walker dir,follow,hiddenoptionFZF_ALT_C_COMMANDto override the default command--walker-*options inFZF_ALT_C_OPTSFZF_ALT_C_OPTSto pass additional options to fzfFZF_ALT_C_COMMANDto an empty string when sourcing the scriptDisplay modes for these bindings can be separately configured via
FZF_{CTRL_T,CTRL_R,ALT_C}_OPTSor globally viaFZF_DEFAULT_OPTS. (e.g.FZF_CTRL_R_OPTS='--tmux bottom,60% --height 60% --border top')More tips can be found on the wiki page.
Fuzzy completion
Shell integration also provides fuzzy completion for bash, zsh, and fish.
Files and directories
Fuzzy completion for files and directories can be triggered if the word before the cursor ends with the trigger sequence, which is by default
**.COMMAND [DIRECTORY/][FUZZY_PATTERN]**<TAB>Process IDs
Fuzzy completion for PIDs is provided for kill command.
Host names
For ssh command, fuzzy completion for hostnames is provided. The names are extracted from /etc/hosts and ~/.ssh/config.
Environment variables / Aliases
Customizing fuzzy completion for bash and zsh
Customizing fzf options for completion