Why there is an empty line begin with "*" in the result of history command on linux?

5

Today at work, I wanna know a history command which I am not very familiar with and I was sure that I just executed a little while ago. However, when I ran history on the same terminal window, I found nothing about the command. What made me more confused, or even annoyed was that I found an empty line begin with a "*" in the output of history. Is there someone who can tell me why? Please give some specific explanations.

 2008  make build_asdfasdfa
 2009  ls
 2010  cd asdfasdf
 2011  ls
 2012* 
 2013  exxxxxxxxxxxxxxxxxxx
 2014  ls
 2015  exxxxxxxxxxxxxxxxxx
 2016  ls
 2017  exxxxxxxxxxxxxxxxxxxxxx
 2018  ls

user3872279

Posted 2014-07-24T09:48:53.790

Reputation: 625

Answers

5

History lines which have been modified, are shown with a * at the beginning of the command, provided that mark-modified-lines property has been turned on in ReadLine configuration.

Here what ReadLine documentation says:

mark-modified-lines
    This variable, when set to On, says to display an asterisk ('*') at the
    start of history lines which have been modified. This variable is off
    by default. 

wizard

Posted 2014-07-24T09:48:53.790

Reputation:

Thank you for your answer! Besides, I wanna know how to modify history?@wizard – user3872279 – 2014-07-28T03:04:45.773