On 11/27/24 10:54 PM, David Moberg wrote:
Yes, if seems like the way to do this in bash. It's unfortunate because doing it with a binding is more elegant as it avoids polluting the terminal output and shell history.

You don't have to put anything in the history you don't want to. If you
don't want to see `fg' and `bg' commands in the history, use
HISTIGNORE.

HISTIGNORE='[ ]*:&:fg:bg'

prevents commands beginning with spaces, repeated commands, and `fg' and
`bg' from being saved to the history list.

My terminal emulator doesn't end up showing the `fg' when I use it to
get back into the editor I've suspended, but your mileage may vary.


In hindight: should the changes that were made to bash due to this discussion, be reverted? The previous behavior was less annoying to me (maybe because I was used to it)

No, I don't think saving readline's terminal settings for restoring later
is particularly useful.

Chet

--
``The lyf so short, the craft so long to lerne.'' - Chaucer
                 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRU    c...@case.edu    http://tiswww.cwru.edu/~chet/

Attachment: OpenPGP_signature.asc
Description: OpenPGP digital signature

Reply via email to