m/fzf
1
0
mirror of https://github.com/junegunn/fzf.git synced 2025-11-18 08:13:40 -05:00

Embed shell integration scripts in fzf binary (--bash / --zsh / --fish) (#3675)

This simplifies the distribution, and the users are less likely to have
problems caused by using incompatible scripts and binaries.

    # Set up fzf key bindings and fuzzy completion
    eval "$(fzf --bash)"

    # Set up fzf key bindings and fuzzy completion
    eval "$(fzf --zsh)"

    # Set up fzf key bindings
    fzf --fish | source
This commit is contained in:
Junegunn Choi
2024-03-13 23:59:34 +09:00
committed by GitHub
parent d282a1649d
commit e74b1251c0
7 changed files with 197 additions and 54 deletions

View File

@@ -33,6 +33,10 @@ fzf [options]
fzf is a general-purpose command-line fuzzy finder.
.SH OPTIONS
.SS Note
.TP
Most long options have the opposite version with \fB--no-\fR prefix.
.SS Search mode
.TP
.B "-x, --extended"
@@ -879,9 +883,24 @@ The default value is the current working directory.
Comma-separated list of directory names to skip during the directory walk.
The default value is \fB.git,node_modules\fR.
.SS Note
.SS Shell integration
.TP
Most options have the opposite versions with \fB--no-\fR prefix.
.B "--bash"
Print script to set up Bash shell integration
e.g. \fBeval "$(fzf --bash)"\fR
.TP
.B "--zsh"
Print script to set up Zsh shell integration
e.g. \fBeval "$(fzf --zsh)"\fR
.TP
.B "--fish"
Print script to set up Fish shell integration
e.g. \fBfzf --fish | source\fR
.SH ENVIRONMENT VARIABLES
.TP