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

[Bug]: some commands are missed by atuin for no apparent reason? #2361

Open
aborrero opened this issue Aug 12, 2024 · 3 comments
Open

[Bug]: some commands are missed by atuin for no apparent reason? #2361

aborrero opened this issue Aug 12, 2024 · 3 comments
Labels
bug Something isn't working

Comments

@aborrero
Copy link

What did you expect to happen?

When I type on one terminal window this:

arturo@nostromo:~$ stty raw -echo

I open another terminal window, run atuin (CTRL+R) and I see the above command as the last command.

What happened?

I typed on one terminal window this:

arturo@nostromo:~$ stty raw -echo

Then opened another terminal window, hit CTRL+R to open the atuin panel, and the above command was not present.

Atuin doctor output

{
  "atuin": {
    "version": "18.3.0",
    "sync": {
      "cloud": true,
      "records": false,
      "auto_sync": true,
      "last_sync": "2024-08-12 16:46:07.182128342 +00:00:00"
    },
    "sqlite_version": "3.44.0"
  },
  "shell": {
    "name": "bash",
    "default": "bash",
    "plugins": [
      "atuin",
      "bash-preexec"
    ],
    "preexec": "bash-preexec"
  },
  "system": {
    "os": "Debian GNU/Linux",
    "arch": "x86_64",
    "version": "unknown",
    "disks": [
      {
        "name": "/dev/mapper/nostromo--vg-root",
        "filesystem": "ext4"
      },
      {
        "name": "/dev/nvme0n1p2",
        "filesystem": "ext2"
      },
      {
        "name": "/dev/mapper/nostromo--vg-tmp",
        "filesystem": "ext4"
      },
      {
        "name": "/dev/mapper/nostromo--vg-var",
        "filesystem": "ext4"
      },
      {
        "name": "/dev/mapper/nostromo--vg-home",
        "filesystem": "ext4"
      },
      {
        "name": "/dev/nvme0n1p1",
        "filesystem": "vfat"
      }
    ]
  }
}


### Code of Conduct

- [X] I agree to follow this project's Code of Conduct
@aborrero aborrero added the bug Something isn't working label Aug 12, 2024
@ellie
Copy link
Member

ellie commented Aug 12, 2024

Hey! Thanks for the issue

Firstly some context - bash does not provide shell hooks, which we require to hook into the lifecycle of a command. To work around this, we use bash-preexec. It mostly solves the problem, but isn't quite as effective as a native integration. All other shells we support have hooks included as standard.

While the cause of your specific problem is unclear, it will likely be solved by using ble.sh instead of bash-preexec. We can't do this by default as it's a much larger change to your shell

Otherwise, could you share the version of Bash you're using please? Older versions have more edge cases here

@aborrero aborrero changed the title [Bug]: some commands are missed by autin for no apparent reason? [Bug]: some commands are missed by atuin for no apparent reason? Aug 17, 2024
@aborrero
Copy link
Author

Ok, I will try with ble.sh and report back.

I wish there was an atuin log one could access to see what internal code path atuin was experiencing for processing a given shell command. Can you advice about this?

@ellie
Copy link
Member

ellie commented Aug 17, 2024

you could

export ATUIN_LOG=debug

It'll be really chatty

Though if it's an issue with the shell integration, Atuin may not be being invoked at all. So logs won't really help you there

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants