This line works for my Raspberry Pi.
source /usr/share/bash-completion/completions/fzf
source /usr/share/doc/fzf/examples/key-bindings.bash
That was the help of ChatGPT, I’ll leave it here as a bonus info.
To source fzf
on your Raspberry Pi OS, you’ll need to add it to your shell configuration file. This ensures that fzf
is available every time you open a new terminal session. Follow these steps:
Open your shell configuration file:
- If you’re using
bash
, this will likely be~/.bashrc
. - If you’re using
zsh
, this will likely be~/.zshrc
.
You can open these files with a text editor like
nano
:nano ~/.bashrc
or
nano ~/.zshrc
- If you’re using
Add the
fzf
initialization script: Add the following line to the end of your shell configuration file:[ -f ~/.fzf.bash ] && source ~/.fzf.bash
or for
zsh
:[ -f ~/.fzf.zsh ] && source ~/.fzf.zsh
This line checks if the
fzf
script exists and sources it if it does.Save and close the file:
- If you’re using
nano
, pressCTRL + X
, thenY
, thenENTER
.
- If you’re using
Reload your shell configuration: To apply the changes immediately without needing to restart your terminal, run:
source ~/.bashrc
or
source ~/.zshrc
Now, fzf
should be available in your terminal. You can test it by typing fzf
and seeing if it launches the fuzzy finder.