Why is this better than a shell's built-in history, possibly paired with fzf? I'm not asking sarcastically, either. Is this something awesome I should be using? What about it is going to blow my mind?
I've recently switched from zsh's built-in history + fzf, so perhaps I can answer. First, a bit more about my zsh+fzf use: I use `share_history` so that my history is available across shells, allowing me to quickly find and re-run commands. ( https://zsh.sourceforge.io/Doc/Release/Options.html#index-SH... ) Sometimes I want to switch back to some terminal tab/window and find a command that I nkow I ran in that sessio…
Atuin – Magical shell history
51–60 of 118 posts
Re: Atuin – Magical shell history
#52Re: Atuin – Magical shell history
#53Been using atuin for a couple months now on Windows in bash. Its a very nice tool however I've been experiencing a huge lag sometimes after typing just one character. Intuition says there could be the database performance is lacking or Im missing some configuration. Anyone else experiencing something similar?
Re: Atuin – Magical shell history
#54I love how it looks and I love some of the fancy features. But above all, it's a solution to two real problems I had. I work in several terminals. Sometimes tabs or Windows in my emulator, sometimes screen or tmux. And all those sessions would overwrite eachothers history. I lost many actual important history entries that way. And I (almost) ran many wrong commands, expecting another one to be my last entry. Arrow-up…
Just checked yesterday* and have well over 100k lines in bash history and it loads / searches instantly in skim.
* Was trying to check out mcfly vs atuin for the third time and again didn't understand why the extra complexity was worthwhile.
Re: Atuin – Magical shell history
#55Why is this better than a shell's built-in history, possibly paired with fzf? I'm not asking sarcastically, either. Is this something awesome I should be using? What about it is going to blow my mind?
Re: Atuin – Magical shell history
#56I've been using this for a couple months after using McFly in zsh for over a year. I think I can say that I like it better, but the only thing I sometimes don't like is how it completely takes over your screen when you press the up arrow. I usually just want to get the previous command I entered instead of the whole searchable history (which I use Control-R to bring up), and it's really jarring to have the entire scr…
Same here, but you can disable that behaviour, and then it’s nicer [0]. I also find that I prefer the default Ctrl-R to start with history from the current directory instead of the global history, but that is also changeable. So I’m pretty happy. [0]: https://docs.atuin.sh/configuration/key-binding/#disable-up-...
Re: Atuin – Magical shell history
#57We currently install `fzf` with the proper keybindings, so Ctrl-R is already quite nice. But we also already include one interactive "pick your $EDITOR" moment - there's no reason we couldn't provide a "pick your $HISTORIAN" with atuin vs fzf as well. It would be fun and might turn people onto new tools, which is a big aim of this project.
Re: Atuin – Magical shell history
#58I love how it looks and I love some of the fancy features. But above all, it's a solution to two real problems I had. I work in several terminals. Sometimes tabs or Windows in my emulator, sometimes screen or tmux. And all those sessions would overwrite eachothers history. I lost many actual important history entries that way. And I (almost) ran many wrong commands, expecting another one to be my last entry. Arrow-up…
# append rather than overwrite
shopt -s histappend
# attempts to save all lines of a multiple-line command in the same history entry
shopt -s cmdhist
# with cmdhist, saved with embedded newlines rather than semicolon separators
shopt -s lithist
HISTCONTROL=ignoreboth
HISTSIZE=10000
HISTFILESIZE=20000
HISTTIMEFORMAT="%y/%m/%d %T "
HISTIGNORE="history:ls:l:pwd:exit:"
if [[ ${BASH_VERSION:0:1} -gt 5 || ${BASH_VERSION:0:1} -ge 5 && ${BASH_VERSION:2:1} -ge 1 ]]; then
PROMPT_COMMAND=("history -a" "history -c" "history -r")
else
PROMPT_COMMAND="history -a; history -c; history -r"
fi
- And about the 2nd issue, you should use fzf or skim (probably faster) to replace the ctrl-r binding. fzf includes such a script that you just need to call from .bashrc. # Enable key bindings for fzf
if command -v fzf 1> /dev/null && [[ -f "/usr/share/doc/fzf/examples/key-bindings.bash" ]]; then
source /usr/share/doc/fzf/examples/key-bindings.bash
fiRe: Atuin – Magical shell history
#59I switched a year or two ago It wasn't until I switched that I realized how poor bash and zsh are in comparison, even with fzf 10 min install, never looked back Not to mention the safety. Never could figure it out, but once every 15 months or so, zsh would disappear my history. Certainly a mistake on my end, but still too easy to blow away history
I would occasionally manage to start a bash shell without executing my profile, which means HISTFILESIZE is not set and bash would truncate my history on the first command I ran. zsh history may have a similar problem.