-
-
Notifications
You must be signed in to change notification settings - Fork 606
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]: first command of bash session is not saved #2491
Comments
$ declare -p PROMPT_COMMAND
$ trap -p DEBUG |
I'm starting a new shell and execute the commands respectively as first one, but the output doesn't seem to be different when executing it any time later.
In contrast, it seems that
My |
@N-Coder, here the .bash-preexec.sh https://docs.atuin.sh/guide/installation/#installing-the-shell-plugin |
Yes, I have that one installed. The file on master says version 0.5.0. |
I have the same issue was you on the first command in bash, but when i put the .bash-preexec the new sessios register all entries. |
Sorry, I didn't catch that. What did you do? The .bash-preexec is loaded in my .bashrc. |
When I saw your topic, I didn't have .bash-preexec and had the same behavior. |
While testing another report, I realized that this happens in kitty. The problem still doesn't arise in other terminals. It seems to be some interference between bash-preexec and kitty's shell integration. |
I checked what was happening. kitty's shell integration appends the following command to the shell variable builtin declare -F _ksi_prompt_command > /dev/null 2> /dev/null && _ksi_prompt_command Since bash-preexec relies on the DEBUG trap to determine when it fires the For the second and later calls of |
Could you please tell me how you found this out? Then I could check whether the issue is the same for the Gnome Terminal I'm using. |
To check whether the same issue causes the problem, I think you can check the variable printf "\\033]0;%s@%s:%s\\007" "${USER}" "${HOSTNAME%%.*}" "${PWD/#$HOME/\\~}" in your printf "\\033]0
%s@%s:%s\\007" "${USER}" "${HOSTNAME%%.*}" "${PWD/#$HOME/\\~}" Then, the |
To work around the issue,
|
What did you expect to happen?
All commands that I execute should be saved in atuin's history.
What happened?
Whenever I open a new bash session (by opening a new terminal windows or by invoking
bash
), the first command executed is not saved by atuin. All further commands are saved as expected:Screencast.From.2024-12-20.15-35-12.mp4
If I "cancel" the first command by pressing Ctrl+C, the next command is also saved as expected:
Screencast.From.2024-12-20.15-36-21.mp4
Atuin doctor output
Code of Conduct
The text was updated successfully, but these errors were encountered: