Live data from Hacker News

Atuin replaces your existing shell history with a SQLite database

github.com

61–70 of 198 posts

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

#61
post #6

What's it like with many shells/panes in multiplexers open? I often find my history from one or another either lost or not available across different ones.

Works great! To me the reliable instant history sync between tmux panes is one of the best features of atuin. I tried many things to get this working with vanilla bash and it always seemed flaky.

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

#62

No one ever addresses the most important problem: how to separate commands that one would like to retain (preferably indefinitely) vs garbage commands (like cd, ls, cat, etc.) that should better be wiped in a few days.

While that’s certainly useful to cull trivial commands, it can also behoove the user to remove commands done wrong. Coming back several months later to be gifted with several, very similar commands of which only one is right can be frustrating. The history records the failed tries as well as the successes. Mind, the errors give a place to start, but if it’s far enough removed from the original event it may well be am…

> Coming back several months later to be gifted with several, very similar commands of which only one is right can be frustrating. The history records the failed tries as well as the successes.

The correct command is almost always the last one, so as long as your search results are chronological this shouldn't be an issue?

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

#63

No one ever addresses the most important problem: how to separate commands that one would like to retain (preferably indefinitely) vs garbage commands (like cd, ls, cat, etc.) that should better be wiped in a few days.

Why put effort into removing them? They use a trivial amount of disk space.

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

#64

I made a script that uses atuin to get previous commands related to your current command line - latest commands ran in the same session, in the same directory, in other sessions, latest commands for the same executable etc. then feeds it into GPT and streams the replies to fzf so you can choose the best autocompletion (or it can fix problems in the line you've written already as well). On Wezterm and Kitty it can als…

That sounds awesome, if somewhat overengineered.

Though the idea of mistakenly putting credentials in the cli and it ending up in GPT is bothering me a bit.

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

#68
The problem I see is that if I ssh into 5 different remote hosts in a day, most of the commands are not executed on my host and thus not part of the local (or shared, distributed) history.

I suppose this could be solved with either:

- Some kind of modified ssh that sends back the commands to my host

- Some kind of smart terminal that can analyze commands to build up the history

Any ideas on how to practically solve this problem?

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

#70
post #23

Earlier quoted context omitted.

While sqlite is pretty cool technology, it doesn't quite deserve the title of "magic".

The joke was because of the Terry Pratchett reference. https://discworld.fandom.com/wiki/Great_A%27Tuin

It took me way too long to realise that's where the name was from...
Post reply on HN