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]: commented commands not shown in history #1998

Open
chain710 opened this issue May 3, 2024 · 4 comments
Open

[Bug]: commented commands not shown in history #1998

chain710 opened this issue May 3, 2024 · 4 comments
Labels
bug Something isn't working

Comments

@chain710
Copy link

chain710 commented May 3, 2024

What did you expect to happen?

Expect same behavior as bash, like:

# echo hello

You can find this record again using ctrl + r.

What happened?

Fresh install, can not find commands starts with '#'

Atuin doctor output

atuin:
  version: 18.2.0
  sync: null
shell:
  name: bash
  default: unknown
  plugins:
  - atuin
  - bash-preexec
system:
  os: Debian GNU/Linux
  arch: x86_64
  version: '12'
  disks:
  - name: /dev/sda1
    filesystem: ext4


### Code of Conduct

- [X] I agree to follow this project's Code of Conduct
@chain710 chain710 added the bug Something isn't working label May 3, 2024
@chain710 chain710 changed the title [Bug]: commented commands not shown in histoiry [Bug]: commented commands not shown in history May 3, 2024
@angrychimp
Copy link

I'm using Atuin 18.2.0 on MacOS and I'd also love to see commented-commands appear in my history

@ellie
Copy link
Member

ellie commented May 18, 2024

I'm afraid commented commands not showing is a limitation of bash-preexec. It's a hack we have to use to get shell hooks on bash, as bash does not support them itself

You have two options really

  1. Stick with bash, but use ble.sh
  2. Use any other shell supported by atuin. I'd usually suggest zsh.

@angrychimp
Copy link

I honestly didn't notice before that this bug was for bash. I am using zsh on MacOS - is there a config setting I should be using or something else I ought to do differently?

  version: 18.2.0
  sync: null
shell:
  name: zsh
  default: zsh
  plugins:
  - atuin
system:
  os: Darwin
  arch: arm64
  version: 14.4.1
  disks:
  - name: Macintosh HD
    filesystem: apfs
  - name: Macintosh HD
    filesystem: apfs

@ellie
Copy link
Member

ellie commented May 18, 2024

Could you give an example of a commented command that does not work for you? and could you share your zsh config please?

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

3 participants