Live data from Hacker News

Atuin – Magical shell history

atuin.sh

101–110 of 118 posts

Re: Atuin – Magical shell history

#101

I 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.

I think that's it! I've been wondering why Bash sometimes deletes most of my history for ages. My .bashrc sets up an EXIT trap that git-commits my history, so I just looked at the commits that remove lines and found that 7 out of 8 of those commits change the size of the history file to about 1000 lines. Since my history file contains timestamps, that matches the 500-command default of HISTSIZE, so the truncation mechanism you described seems to be what's happening.

A few days ago I actually made my history file append-only to prevent truncation.

Re: Atuin – Magical shell history

#102

I see good value in the sync. But since I use different flavors of UNIX and Linux some of the commands are different. I think it could get confusing. Obviously you could just not synch between platofrms

You’re filtered for commands used on the current machine by default, though there is an easy toggle to search remote-host commands too.

Re: Atuin – Magical shell history

#103
Atuin is lovely, although I found some of its defaults pretty annoying until I changed them:

- It turns out I basically never want fuzzy search through my command history, and certainly not by default. I gave it a try for a couple weeks but it was very frustrating to be searching for a particular command, type in the exact prefix, and have the thing I was looking for hidden among hundreds of irrelevant entries. Solution: search_mode = "fulltext" in Atuin's config.toml

- Having a full screen pop-up appear whenever I hit up was really jarring, especially since I have a habit of hitting up a few times when I'm at the command line thinking of what I need to do next, to sort of refresh my memory on what I was just doing; the popup very effectively destroyed that chain of thought. Solution: eval "$(atuin init bash --disable-up-arrow)" in .bashrc

These are pretty minor issues and it's possible my preferences are just different from most!

Atuin now works really nicely for me. My only outstanding issues are:

- Under mosh the UI ends up corrupting the screen; apparently this is really more of a mosh bug (no alternate screen support) and you can work around it by having tmux/screen running: https://github.com/atuinsh/atuin/issues/1324

- I still don't have a great model in my head of how sync works and find myself occasionally force-syncing across a few systems until I convince myself everything is in the same state.

- It would be nice to have some kind of settings sync so I don't have to make the config changes mentioned above on 10 different systems. Surprisingly I don't see a feature request for this yet so maybe I'll go open one...

Anyway I don't want these issues to stop people from trying Atuin – it's a really nice piece of software. I almost never make changes to the default environment so I consider it a testament to how useful it is that I've added it to all the systems I use regularly!

Re: Atuin – Magical shell history

#104

I 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.

Setting HISTFILE to a non-default value in the same place as HISTSIZE/HISTFILESIZE seems like it would solve this problem nicely.

Re: Atuin – Magical shell history

#105

Earlier quoted context omitted.

That bug report is 12 days old...

And some bug reports are 20 years old. A broken workflow is a broken workflow.

I mean, that literally does not logically follow. Yes, some bug reports are 20 years old. My point is precisely that this one hasn't become a 20-year-old bug and the way the parent comment read made it sound like it's a glaring, long-lasting issue when it's not.

"A broken workflow is a broken workflow" is just a tautology. I guess you're implying "any kind of broken workflow is bad" but yeah, I don't agree with that especially with regards to free tools. The project literally has weekly commits, devs are open and engaged and... patches are welcome

Re: Atuin – Magical shell history

#106
This has been discussed ad nauseam:

https://news.ycombinator.com/item?id=35839470

https://news.ycombinator.com/item?id=38936102

https://news.ycombinator.com/item?id=27079862

https://news.ycombinator.com/item?id=32491840

https://news.ycombinator.com/item?id=31177943

https://news.ycombinator.com/item?id=35688117

https://news.ycombinator.com/item?id=38969077

https://news.ycombinator.com/item?id=37127909

https://news.ycombinator.com/item?id=35876290

https://news.ycombinator.com/item?id=34972384

https://news.ycombinator.com/item?id=33786580

https://news.ycombinator.com/item?id=38797713

https://news.ycombinator.com/item?id=39457875

Re: Atuin – Magical shell history

#107

Earlier quoted context omitted.

And some bug reports are 20 years old. A broken workflow is a broken workflow.

I mean, that literally does not logically follow. Yes, some bug reports are 20 years old. My point is precisely that this one hasn't become a 20-year-old bug and the way the parent comment read made it sound like it's a glaring, long-lasting issue when it's not. "A broken workflow is a broken workflow" is just a tautology. I guess you're implying "any kind of broken workflow is bad" but yeah, I don't agree with that…

I mean, it is a glaring issue for me, but often it causes the most frustration in another task, so I didn’t personally report it much sooner, but it has been broken for a while.

Re: Atuin – Magical shell history

#108

Earlier quoted context omitted.

And some bug reports are 20 years old. A broken workflow is a broken workflow.

I mean, that literally does not logically follow. Yes, some bug reports are 20 years old. My point is precisely that this one hasn't become a 20-year-old bug and the way the parent comment read made it sound like it's a glaring, long-lasting issue when it's not. "A broken workflow is a broken workflow" is just a tautology. I guess you're implying "any kind of broken workflow is bad" but yeah, I don't agree with that…

> "A broken workflow is a broken workflow" is just a tautology. I guess you're implying "any kind of broken workflow is bad" but yeah, I don't agree with that especially with regards to free tools. The project literally has weekly commits, devs are open and engaged and... patches are welcome

I just wanted to respond to this a bit more. My moving away from a project is my choice. Just because it has active devs and regular commits doesn’t mean that I’m in any way obligated to continue to use it, or contribute to it. It doesn’t fit my workflow, and the issues are longstanding and glaring. Might they be fixed in the future? Sure. Am I interested in sending patches in or tracking that effort? Actually it really doesn’t even matter, a broken workflow is a broken workflow, even when the tool is free. It doesn’t work for me as is and I will find something else if I want.

This seems to be some sort of defensive response as if I was attacking the project. On the contrary, and like I said before, I generally like it, but the issues I have, which are to be both glaring and longstanding, means that it doesn’t fit my workflow and I’m considering moving. Not all tools need to suit everyone’s workflows, and “patches are welcome” is very beside the point.

Re: Atuin – Magical shell history

#109
post #103

Atuin is lovely, although I found some of its defaults pretty annoying until I changed them: - It turns out I basically never want fuzzy search through my command history, and certainly not by default. I gave it a try for a couple weeks but it was very frustrating to be searching for a particular command, type in the exact prefix, and have the thing I was looking for hidden among hundreds of irrelevant entries. Solut…

I ended up using its compact mode and limiting to a few lines, so instead of taking up my full screen it only takes up a few lines below the prompt. Much more reasonable.

Re: Atuin – Magical shell history

#110
post #79
post #65

Earlier quoted context omitted.

Deduplication as an option or shortcut would be nice. But I think Atuin should and maybe must save all commands in the database.

Why should it store garbage in the database?

Why do you enter garbage in the terminal? But seriously from the next answer: „ The reason it saves every command is so that it can produce statistics, for example exit code distribution and runs per day etc“
Post reply on HN