Posted: . At: 12:31 PM. This was 2 years ago. Post ID: 16245
Page permalink. WordPress uses cookies, or tiny pieces of information stored on your computer, to verify who you are. There are cookies for logged in users and for commenters.
These cookies expire two weeks after they are set.


Very nice Bash shell prompt I came up with.


This is a very nice bash shell prompt I came up with.

PS1="▩\[\033[38;5;33m\]\u\[$(tput sgr0)\]@\[$(tput sgr0)\]\[\033[38;5;79m\]\H\[$(tput sgr0)\]:\[$(tput sgr0)\]\[\033[38;5;174m\]\w\[$(tput sgr0)\]\n┗╼╼╼╼> \[$(tput sgr0)\]\[\033[38;5;82m\]\v\[$(tput sgr0)\] ┋► \[$(tput sgr0)\]\[\033[38;5;36m\]\\$ \[$(tput sgr0)\] \[$(tput sgr0)\]"

This is what this prompt looks like in action. You can use many cool tricks when using a multi-line shell prompt.

▩jason@jason-Lenovo-H50-55:~
┗╼╼╼╼> 5.0 ┋► $

This is another one I just made.

export PS1="▛\[\033[38;5;219m\]\H\[$(tput sgr0)\]@\[$(tput sgr0)\]\[\033[38;5;114m\]\u\[$(tput sgr0)\] (\[$(tput sgr0)\]\[\033[38;5;201m\]\$?\[$(tput sgr0)\]) \n▙▃▃▃▃▃▃▃▃▗▗▗▗▗▗▗▗▗▗▗▗▗▟[\[$(tput sgr0)\]\[\033[38;5;14m\]\w\[$(tput sgr0)\]] \[$(tput sgr0)\]\[\033[38;5;226m\]>\[$(tput sgr0)\] \[$(tput sgr0)\]\[\033[38;5;7m\]\[\033[48;5;8m\]\\$\[$(tput sgr0)\] \[$(tput sgr0)\]"

And this is what it looks like.

▛jason-Lenovo-H50-55@jason (0) 
▙▃▃▃▃▃▃▃▃▗▗▗▗▗▗▗▗▗▗▗▗▗▟[~] > $

It is a lot of fun to come up with a nice shell prompt like this. Using special DOS line characters really helps them look great.


Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.