-
-
Notifications
You must be signed in to change notification settings - Fork 777
Description
In bash, if a user modifies their shell prompt (after calling atuin init bash) this breaks command recording in atuin.
The fix is make sure that the following commands appear at the end of whatever bash configuration file your are using to configure bash.
# atuin init MUST run last at shell startup time.
# Specifically, init must run after any PS1 prompt function definition
# otherwise this stops atuin from recording commands to the database.
. "$HOME/.atuin/bin/env"
[[ -f ~/.bash-preexec.sh ]] && source ~/.bash-preexec.sh
eval "$(atuin init bash)"This may be a big ask due to the number of shells atuin supports and the need to a complete a postgraduate taught/research program to fully understand how interactive shells are configured using files, so if too hard, please close, but here's the ask:
Have atuin doctor detect if the running of atuin init bash happens last in .bashrc
or
report the last command record time and if older than today, have the doctor output suggest that command recording is broken due to user error via shell prompt hacking.
Thank you for atuin, it's awesome. Thank you pointing me in the direction of ble.sh, also brilliant.