On 2024-07-27 23:58, Greg Wooledge wrote:

You need to specify *exactly* what you're doing.

My project management skills are non-existent.
If I have a script that is working I'll copy to eg. script2 and make changes to that. Sometimes, depending, I'll have similar things in other directories that I"ll use bits of. Mainly using different windows Ctrl+Alt+arrows in Xfce with their own virtual terminals. Sometimes I forget where I was after closing a virtual terminal and it would be handy to see the history
in a new terminal, where I "cd'd" to for example.
stuff like that.


If you close a terminal emulator in such a way that it kills the shell
without letting the shell write history to disk, then the history will
not be saved.

If you want history to be saved, you should exit from the *shell*
(e.g. by pressing Ctrl-D), rather than closing the terminal and counting
on that to terminate the shell in a way that will preserve history.

If you *don't* want history to be saved, there are many ways to make
that (not) happen, depending on your terminal emulator and so on. You'll
need to experiment, though, to see exactly what happens when you do
whatever it is you do.

Whenever I need to reboot my computer (kernel update or the like), I
decide which shells I want to retain history from, and I exit from those
cleanly (^D).  I leave the others running, and exit from FVWM, which
kills them in a way that causes their history not to be written.

If you want a particular shell window's history to be AGGRESSIVELY
written to disk every time you run a command, you can arrange for that
as well.  See <https://mywiki.wooledge.org/BashFAQ/088> for example.

Reply via email to