1.7 KiB
1.7 KiB
Bash + fzf Setup (Fish-like UX without switching shells)
What was done
- Decided to stay on Bash instead of switching to Zsh or Fish
- Installed
fzfandbash-completionvia pacman (EndeavourOS) / apt (Debian VPS) - Added activation block to
~/.bashrc
Key insight
You don't need to switch shells to get Fish-like autocomplete and fuzzy history. fzf drops straight into Bash with zero compatibility risk — and Bash stays consistent across desktop and VPS.
The .bashrc block to add
# bash-completion
[[ -r /usr/share/bash-completion/bash_completion ]] && . /usr/share/bash-completion/bash_completion
# fzf
eval "$(fzf --bash)"
Commands
| What | Command |
|---|---|
| Install (Arch/EndeavourOS) | sudo pacman -S fzf bash-completion |
| Install (Debian/VPS) | sudo apt install fzf bash-completion |
| Reload config | source ~/.bashrc |
| Fuzzy history search | Ctrl+R |
| Fuzzy file search | Ctrl+T |
| Fuzzy directory jump | Alt+C |
| Jump to line in nano | Ctrl+_ then line number |
| Toggle line numbers in nano | Alt+N |
When to use
- Any time you set up a new Bash environment (VPS, new machine)
- Same config works on Arch and Debian — package manager is the only difference
Fixing a corrupted .bashrc
If a paste goes wrong and injects garbage into .bashrc:
cat -n ~/.bashrcto find the broken linesnano ~/.bashrc→Ctrl+_to jump to line number,Ctrl+Wto search- Remove the injected string carefully, leaving the rest of the line intact
- Watch for
esackeywords — they're easy to corrupt and hard to spot source ~/.bashrcto verify the fix
Index line
bash_fzf_setup.md — Bash fuzzy search setup; fzf + bash-completion; fixing corrupted .bashrc