logoalt Hacker News

petschgetoday at 8:21 AM0 repliesview on HN

You can just add something like (\\!) in your PS1 and get just that.

PS1="(\\!) \[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ "

as a full working example