1
This happens. Typing:
$ qwer
$ asdf
$ zxcv
up-arrow twice, backspace, backspace, down-arrow twice, then:
$ history 4
519 qwer
520* as
521 zxcv
522 history 4
The star by 520
tells me it's an intended feature.
I do not know how to control this kind of history editing. It has been in the way many more times than it has helped me, and I would like to disable it.
1
Possible duplicate of How to prevent Bash from altering history?
– Gray -- SO stop being evil – 2019-10-15T18:42:13.520