Comment by ilvez
2 days ago
For command search I've replaced regular search and fzf with atuin. Works especially well with multiple hosts.. https://atuin.sh/
EDIT: The OP fails to mention zsh profiling: zprof. I discovered that atuin is my biggest waster at the moment with like 20ms and rest of the stuff I could clean up.
I'm using fzf and it's amazing. What does atuin bring additionally? Looks very similar
I use atuin for the shell history as it seems to know when I've run a command in one tab/split while another is open where fzf doesn't seem to sync it all the time. But I still use fzf to find files.
(Bonus, I use Zoxide to replace the alt+d cd shortcut as it's much faster, and use https://github.com/Aloxaf/fzf-tab for tab completions in the terminal to become fuzzy, very very useful)
>it seems to know when I've run a command in one tab/split while another is open where fzf doesn't seem to sync it all the time.
On my machine this is handled in zsh, not fzf (but then fzf still benefits). You can configure your shells to sync without exiting. You may need to run one command (or just hit enter with nothing typed, maybe) for the shell history to catch up, but then it should all be there. Relevant options:
# share history among terminals
setopt share_history
# append to the history instead of overwriting
setopt append_history
# append to history incrementally instead of when the shell exits
setopt inc_append_history
I think finding out about this is why I originally switched from bash to zsh several years ago.
1 reply →
Atuin also has syncing and backups though I've never really felt the need to use it. I prefer keeping histories separate and when I need to share shell commands I just do the usual methods like putting it in a shared text file, send it to myself on a chat app or just looking at the command and typing it out
Yeah. It boils down to preferences. By the way, there is also an option to search only in current host and current directory as well (+current session).