Skip to content

Commit

Permalink
docs: update zsh integration instructions (#3794)
Browse files Browse the repository at this point in the history
  • Loading branch information
LangLangBart committed May 14, 2024
1 parent 8a110e0 commit 030428b
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ Add the following line to your shell configuration file.
* zsh
```sh
# Set up fzf key bindings and fuzzy completion
eval "$(fzf --zsh)"
source <(fzf --zsh)
```
* fish
```fish
Expand All @@ -226,7 +226,7 @@ Add the following line to your shell configuration file.
> For example, to disable ALT-C binding:
>
> * bash: `FZF_ALT_C_COMMAND= eval "$(fzf --bash)"`
> * zsh: `FZF_ALT_C_COMMAND= eval "$(fzf --zsh)"`
> * zsh: `FZF_ALT_C_COMMAND= source <(fzf --zsh)`
> * fish: `fzf --fish | FZF_ALT_C_COMMAND= source`
>
> Setting the variables after sourcing the script will have no effect.
Expand Down
6 changes: 5 additions & 1 deletion install
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,11 @@ fi
EOF

if [[ $auto_completion -eq 1 ]] && [[ $key_bindings -eq 1 ]]; then
echo "eval \"\$(fzf --$shell)\"" >> "$src"
if [[ "$shell" = zsh ]]; then
echo "source <(fzf --$shell)" >> "$src"
else
echo "eval \"\$(fzf --$shell)\"" >> "$src"
fi
else
cat >> "$src" << EOF
# Auto-completion
Expand Down
2 changes: 1 addition & 1 deletion man/man1/fzf.1
Original file line number Diff line number Diff line change
Expand Up @@ -911,7 +911,7 @@ e.g. \fBeval "$(fzf --bash)"\fR
.B "--zsh"
Print script to set up Zsh shell integration

e.g. \fBeval "$(fzf --zsh)"\fR
e.g. \fBsource <(fzf --zsh)\fR

.TP
.B "--fish"
Expand Down

0 comments on commit 030428b

Please sign in to comment.