Live data from Hacker News

Atuin replaces your existing shell history with a SQLite database

github.com

131–140 of 198 posts

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

#131

Earlier quoted context omitted.

Maybe I have some sort of disease, but while reading "find words out of order or support features like stemming" the regexs for that immediately flashed before my eyes, so I think "necessary" is a little strong there.

FTS is not the same as regex.

I don't think I said it was. I was addressing the specific use cases mentioned. If there's another use case you think is important in searching command line history, feel free to describe it.

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

#135
post #132

I'm interested in this - I've just installed. Is there a way to import all my existing history from `.zsh_history`? It's a real pain to have to start from scratch.

I’m trying to compare this to mcfly, which does that, and also uses a sqlite db

https://github.com/cantino/mcfly

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

#136

It looks like it's not possible to export the history to a format the shell can import[0], so if I wanted to try this out, my commands would be locked there. It looks interesting, so if I'm overlooking a way to do this with fish, I'd experiment with it. [0]: https://github.com/ellie/atuin/issues/816

We’d like to be able to also export history, but atuin doesn’t actually stop your old shell history from functioning either

So you could uninstall it, and you won’t have lost a thing

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

#140
post #119

Earlier quoted context omitted.

Grep only works if you want an exact string match. If you want to find words out of order or support features like stemming, fts is necessary.

With a small enough corpus, full text search does not require an index to be instantaneous, and 100k entries is easily small enough for that. Additionally, everything you describe can be phrased as a regular expression.

Sometimes it's nice to not manually write a regexp to find all of the variants of every word or deal with arbitrary ordering of substrings. And if you're using SQLite and fts5 is installed, why not just create a virtual full text search table with one command and use that? With a small enough corpus, it's a meaningless distinction to bikeshed about the implementation: the easiest solution to build is the best. 500MB of disk space for a pet project that gives you convenience is a terrifically small amount of storage. I have videos that I recorded on my phone that take up more than double that.
Post reply on HN