Random Stuff About Stuff

Why are there asterisks beside some lines in .zsh_history

January 04, 2017

So

10101  cd
10102  cat .zsh_history
10103* cd Dropbox/imac
10104* ls
10105* ls -la
10106* cat .zsh_history
10107* cat .zsh_history ~/.zsh_history
10108* cat .zsh_history ~/.zsh_history | sort -nr
10109* cat .zsh_history ~/.zsh_history | LC_ALL=C sort -nr
10110* vi ~/.zsh_history
10111* cat .zsh_history ~/.zsh_history
10112* cat .zsh_history ~/.zsh_history | sort
10113* cat .zsh_history ~/.zsh_history | LC_ALL=C sort
10114  pwd
10115  cat Dropbox/imac/.zsh_history

What’s with the asterisk on some lines?

Turns out it means the line has being modified from the manual here it says

mark-modified-lines

This variable, when set to ‘on’, causes Readline to display an asterisk (‘*’) at the start of history lines which have been modified. This variable is ‘off’ by default.


Written by David Kerwick who lives and works Dublin as a Java Technical Lead.