Why some lines (as below line 509 and 512 ) in Bash history become \"*\", after I execute reverse-i-search?
507 stty -ixon
508 history
509*
510 echo 10
5
The star means the line has been modified. See man history
.
Demonstration:
From the terminal prompt use the up-arrow key to display a previous command. Delete the command with the backspace key. Use the down-arrow key to return to the last prompt and enter history The modified line should now be displayed in the history as a line number followed by a star.
*
Asterisk is an indication as well, that the commands were run from a different session. You can check this by opening two terminal windows, running bunch of commands and checking history
on both. Asterisk will only appear on the commands the other window executed.