atuinsh / atuin

✨ Magical shell history
https://atuin.sh
MIT License
20.95k stars 565 forks source link

[Bug]: cargo fallback setup method sources cargo env in .profile #2071

Closed funkyfisch closed 5 months ago

funkyfisch commented 5 months ago

What did you expect to happen?

After adding the eval $(atuin init bash) to my bashrc file, it should work fine in all future bash sessions

What happened?

When falling back to the cargo installation method (which builds the whole project), a line inside ~/.profile is added, but after the .bashrc file is sourced. Which means that if my .bashrc file has the above eval line somewhere, it will fail because atuin wont be recognized until the cargo env is sourced.

This was caught on a RPI4 installation which is different from typical ubuntu installations

Atuin doctor output

Atuin Doctor
Checking for diagnostics

[Shell] If you are using Bash, Atuin requires that either bash-preexec or ble.sh be installed. An older ble.sh may not be detected. so ignore this if you have it set up! Read more here: https://docs.atuin.sh/guide/installation/#bash

Please include the output below with any bug reports or issues

atuin:
  version: 18.2.0
  sync: null
shell:
  name: bash
  default: unknown
  plugins:
  - atuin
system:
  os: Debian GNU/Linux
  arch: aarch64
  version: '12'
  disks:
  - name: /dev/mmcblk0p2
    filesystem: ext4
  - name: /dev/mmcblk0p1
    filesystem: vfat

I do have blesh installed in a correct way

Code of Conduct

ellie commented 5 months ago

We no longer fall back to cargo, so I don't think this should be a problem any more

ellie commented 5 months ago

fwiw - with some of the new install script changes, we now just download a binary and automatically add it to the PATH. It might have the same issue, though I don't think it will.