Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Shell history sometimes doesn't save into Atuin #2010

Closed
x0ba opened this issue Dec 6, 2024 · 8 comments
Closed

Shell history sometimes doesn't save into Atuin #2010

x0ba opened this issue Dec 6, 2024 · 8 comments
Labels
bug Something isn't working help wanted Keep Bluefin alive, dive in!

Comments

@x0ba
Copy link

x0ba commented Dec 6, 2024

Describe the bug

Sometimes when I issue commands in Bash, they don't get saved into the Atuin history menu. No changes have been made to the .bashrc but the initial ujust bluefin-cli command.

What did you expect to happen?

Every command is saved into the Atuin history menu.

Output of bootc status

No staged image present
Current booted image: ghcr.io/ublue-os/bluefin-dx:stable-daily
    Image version: 41.20241206 (2024-12-06 01:12:52 UTC)
    Image digest: sha256:94330c20b298846e910da50362e592a55502d80565c649b333e8c1d9a45780d8
Current rollback state is native ostree

Output of groups

daniel wheel docker incus-admin libvirt

Extra information or context

No response

@dosubot dosubot bot added the bug Something isn't working label Dec 6, 2024
@hanthor
Copy link

hanthor commented Dec 6, 2024

I'm wondering if the starship prompt is clobbering the bash history. Kind like when you put a space before the command it doesn't save to history

@castrojo castrojo added the help wanted Keep Bluefin alive, dive in! label Dec 6, 2024
@castrojo
Copy link
Member

castrojo commented Dec 6, 2024

This is horribly annoying but I don't have time to investigate. This doesn't happen ootb just the people that opt into bluefin-cli, but it would be nice to figure out what's going on here.

@hanthor
Copy link

hanthor commented Dec 6, 2024

I'll try to get to bottom of it.

I'll compare what get put in the bashrc from.

https://github.com/ublue-os/bluefin/blob/main/system_files%2Fshared%2Fusr%2Fshare%2Fublue-os%2Fbluefin-cli%2Fbling.sh#L24

@x0ba
Copy link
Author

x0ba commented Dec 6, 2024

This seems to be a problem solely with the bash implementation for atuin, as this issue doesn't happen when I'm using zsh

@phroi
Copy link

phroi commented Dec 17, 2024

Hello Bluefin folks, thank you all for your hard work!! 🤗

As I was saying on Discord, I have the very same issue with bluefin-cli's atuin: atuin history is finnicky as it doesn't record all the commands in its own history. The same was happening before when I was trying out BlueFin in brand new VM installations. No sync account set up. Sometimes it worked, but most of the times it was finicky. To me seems that if history is recalled even one time with Ctrl+R, then it starts working properly (🤔?)

I looked a bit online and it may be some interference between atuin and pre-exec: atuinsh/atuin#380

I also noticed that some changes are gonna happen to how pre-exec enter the system: #2039 (comment)

So you may want to take a look at this while touching that part 🎯

Love & Peace, Phroi

@tulilirockz
Copy link
Collaborator

I've noticed this comment on the mentioned issue on the Atuin sources, I made a PR that forces bling.sh to be only sourced a single time, this should fix these problems, but I am not super sure if it works yet. Anyone mind testing this out? #2072

@castrojo
Copy link
Member

castrojo commented Dec 24, 2024

This seems to have fixed it for me! To test, rpm-ostree usroverlay to turn on write, copy the file over from the PR, then close terminal and test.

(Rebooting will put you back into "production mode".)

@x0ba
Copy link
Author

x0ba commented Dec 26, 2024

Yeah, this seems to have fixed the problem for me as well. I see the PR's already been merged, so I'll go ahead and close this issue.

@x0ba x0ba closed this as completed Dec 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Keep Bluefin alive, dive in!
Projects
None yet
Development

No branches or pull requests

5 participants