-
Notifications
You must be signed in to change notification settings - Fork 95
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
.bash_logout commands get called with preexec repeating the last command line if logging out with CTRL+D #27
Comments
@davefx thanks for reporting! Giving it a look. |
I have an idea for fixing this; the output of fc -l (a replacement for history, see #53) gives a number for each command, like this: if we store the last processed command number, then we can skip preexec in the case it hasn't changed. |
Would it make sense to replace the existing short-circuit checks in |
I've considered this before. @jombooth What about the case where we have duplicate commands and |
What about comparing
|
When logging out from an Ubuntu ssh session with CTRL+D in an empty command line, the preexec function gets called with the previous "$1" while executing the line
/usr/bin/clear_console -q
from~/.bash_logout
.For example:
(The logout was generated pressing CTRL+D)
The text was updated successfully, but these errors were encountered: