J'ai quelques commands remplacées par *
dans l'histoire de bash, par exemple
1094 apt-get update 1095* 1096 dpkg -i /var/cache/apt/archives/libssl1.0.0_1.0.0h-1_amd64.deb
Comment prévenir cela?
On dirait que mark-modified-lines
est activé dans votre shell. Essayez de le désactiver dans ~/.inputrc
:
set mark-modified-lines Off
Détails dans l' man bash
.
1) Mettez set revert-all-at-newline on
votre ~/.inputrc
2) Relisez initfile ( Cx Cr
dans Emacs
-mode)
3) history
types
help history
dit:
Display the history list with line numbers, prefixing each modified entry with a `*'.
LESS=+/revert-all-at-newline man bash
dit:
revert-all-at-newline (Off) If set to On, readline will undo all changes to history lines before returning when accept-line is executed. By default, his- tory lines may be modified and retain individual undo lists across calls to readline.
Remarque:
revert-all-at-newline
fonctionne bash-4.3.30
depuis bash-4.3.30
. Changements:
Fixed a bug that caused effects made by undoing changes to a history line to be discarded.
Prime:
mark-modified-lines
n'est pas lié à une sortie d' history
.
mark-modified-lines If set to On, history lines that have been modified are displayed with a preceding asterisk (*).
Qu'est-ce que ça veut dire?
1) Ajouter les set mark-modified-lines on
~/.inputrc
2) Relisez initfile ( Cx Cr
dans Emacs
-mode)
3) Entrez echo a<ENTER>
4) Tapez la touche <UP>
-arrow
5) Appuyez sur Z
(vous devriez voir *<PS1> echo aZ
)
6) Appuyez sur C-_
(vous ne devriez pas voir *
)