Live data from Hacker News

Atuin replaces your existing shell history with a SQLite database

github.com

1–10 of 198 posts

Re: Atuin replaces your existing shell history with a SQLite database

#2
If this can help with history across many shell instances that would be so great. I've never figured out what to expect, what happens when you have multiple zsh windows across many session, what to expect for how I can navigate that or those histories well.

Random side point, it frustrates me so much I cant get the pre-substitution command taht I actually type, at least in zsh. I really want to see the history of what I type! Not just what the outcome was, but learn & adjust with what I type.

A while back I hacked around writing vim commands that would run my current line (or selection) in a terminal, and then copy the command, paste it after the current line, & go to the next line (and another command to do the same but not re-copy the output). That let me better see the work I had done, and I really liked that, but it was a pretty drastic hack born of desperation.

Shell histories! Yay! Anyone have other good tools they use?

Re: Atuin replaces your existing shell history with a SQLite database

#7

But at what cost?

What kind of cost? Obviously, backups on the author's server are not something I'd ever do, but the "offline only mode" is there, apparently.

TBH I was thinking about doing this for a while now. History of my shell, which now is 3.8MB in size, is one of my competitive advantages as a developer (and a very nice thing to have as a power user). It accumulated steadily since ~2005, and with fzf searching the history is much faster than having to google, as long as I did what I want to do now even once in the distant past. I even wrote a utility to merge history files across multiple hosts[1], so I don't have to think "where did I last use that command", as I have everything on every host. The problem with this, however, is shell startup time. It started being noticeable a few years ago and is slowly getting irritating. The idea of converting the histfile into sqlite db crossed my mind more than once due to this.

[1] https://github.com/piotrklibert/zsh-merge-hist

Re: Atuin replaces your existing shell history with a SQLite database

#10
> Atuin replaces your existing shell history with a SQLite database

How can that work. Nobody is going to pay any ransom for just a shell history, and there are ways to get it out of a SQLite database. Wouldn't it be simpler just to encrypt the original .bash_history?

Post reply on HN