On Thu, 13 Apr 2023 12:48:01 +0200
Vít Ondruch <vondruch(a)redhat.com> wrote:
Dne 12. 04. 23 v 17:40 stan via devel napsal(a):
> On Wed, 12 Apr 2023 10:39:44 +0200
> Vít Ondruch <vondruch(a)redhat.com> wrote:
>
>> What about using `~/.bash_logout` to avoid the need of `hx`?
> I had to do some research to even understand what you were asking.
Sorry, I am not expert in this field. The discussion just caught my
attention and that was result of my very brief research.
What I meant is that I wasn't aware of .bash_logout until you asked
about it. So I learned by researching it, and improved what I was
doing.
> Typing exit or logout is more keystrokes than hx, so
.bash_logout
> is not really compelling.
Ctrl+D is what I am using all the time. That is probably less
keystrokes then `hx`, because you save the pressing the Enter ;)
You're right. And it flows off the fingers nicely. I ended up adding
the trap command to my .bashrc, so now it doesn't matter how I close
the session, it will always be appended to history. I currently have
the PROMPT_COMMAND altered to add history -a too, so I have belt and
suspenders. I haven't really noticed any issues with the appends to
.bash_history every time a new prompt happens, so might leave it. On
the other hand, it isn't really necessary anymore.