
今天上班的時候,我想知道一個history
我不太熟悉的命令,而且我確信我剛剛執行過。但是,當我history
在同一個終端機視窗上運行時,我沒有發現任何有關該命令的資訊。讓我更加困惑,甚至惱火的是,我在 的輸出中發現了一個以「*」開頭的空白行history
。有人可以告訴我為什麼嗎?請給一些具體的解釋。
2008 make build_asdfasdfa
2009 ls
2010 cd asdfasdf
2011 ls
2012*
2013 exxxxxxxxxxxxxxxxxxx
2014 ls
2015 exxxxxxxxxxxxxxxxxx
2016 ls
2017 exxxxxxxxxxxxxxxxxxxxxx
2018 ls
答案1
如果已在 ReadLine 配置中開啟*
該屬性,則已修改的歷史記錄行會在命令開頭顯示。mark-modified-lines
ReadLine 文件的內容如下:
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.