Smiley Face Bash Prompt

PS1="\`if [ \$? = 0 ]; then echo \e[33\;40m\\\^\\\_\\\^\e[0m; else echo \e[36\;40m\\\-\e[0m\\\_\e[36\;40m\\\-\e[0m; fi\` \u \w:\h)"
If your last command was a dud, your bash prompt will be angry at you. Otherwise it's happy. Soon you will crave its constant approval and your linux skills will improve simply to avoid low self-esteem.
Sample Output
^_^ # true
^_^ # false
-_- #

17
2009-06-30 14:29:55

What Others Think

haha! love it!
nottings · 630 weeks and 3 days ago
Very good. Is not for men?
point_to_null · 630 weeks and 3 days ago
a bit emo, but very amusing!
irae · 630 weeks and 2 days ago
it is a very fun command. However, the open colors screw with the ability of (at least gnome-terminal) wrapping text to the next line. Be sure to open and close around each color set to fix this. example: \[\e[36\;40m\]. and when setting back to defaults, leave the semicolon outside. example: \[\e[0m\];
random_bob · 630 weeks and 1 day ago
Thanks. Now, my prompt has officially been rendered unreadable ;-) PS1="\[\033[0;33m\]\u@\h\[\033[0m\]:\[\033[0;36m\]\A\[\033[0m\]:\`if [ \$? = 0 ]; then echo \e[33\;40m\\\^\\\_\\\^\e[0m; else echo \e[36\;40m\\\-\e[0m\\\_\e[36\;40m\\\-\e[0m; fi\`:\[\033[1;34m\]\w\[\033[0m\]>\[\033[0m\] "
Alanceil · 630 weeks and 1 day ago
"Edit": Cleaned up edition with less escapes and a transparent background for the smiley (instead of black): PS1="\033[0;32m\u@\h\033[0m:\033[0;36m\A\033[0m:\`if [ \$? = 0 ]; then echo '\033[1;30m^_^\033[0m'; else echo '\033[0;33m>_>\033[0m' ; fi\`:\033[1;34m\w\033[0m>\033[0m "
Alanceil · 630 weeks and 1 day ago
I went along the same lines, but closed the color codes; PS1="\`if [ \$? = 0 ]; then echo \[\e[34m\]^_^\[\e[0m\]; else echo \[\e[31m\]O_O\[\e[0m\]; fi\`[\u@\h:\w]\\$ " this way it handles text wrap for long commands (like this one)
random_bob · 629 weeks and 4 days ago
Here are some more advanced prompts: http://www.askapache.com/linux/bash-power-prompt.html
AskApache · 252 weeks and 5 days ago
Can't get it. Just want to know the Best NFL players to pick for fantasy football
paultribbiani · 49 weeks ago
I can set up my new idea from this post. It gives in depth information. Thanks for this valuable information for all,.. Click here
bojokey283 · 30 weeks and 6 days ago
Thanks for posting this info. I just want to let you know that I just check out your site and I find it very interesting and informative. I can't wait to read lots of your posts. instagram Abonnenten kaufen bei abonnenten24.de
bojokey283 · 29 weeks and 6 days ago
I am very enjoyed for this blog. Its an informative topic. It help me very much to solve some problems. Its opportunity are so fantastic and working style so speedy. Domótica
bojokey283 · 29 weeks and 5 days ago
Great write-up, I am a big believer in commenting on blogs to inform the blog writers know that they’ve added something worthwhile to the world wide web!.. digital marketing
bojokey283 · 29 weeks and 4 days ago
I can see that you are an expert at your field! I am launching a website soon, and your information will be very useful for me.. Thanks for all your help and wishing you all the success in your business. alquiler de carros en cartagena
bojokey283 · 27 weeks and 6 days ago
Great write-up, I am a big believer in commenting on blogs to inform the blog writers know that they’ve added something worthwhile to the world wide web!.. bridgend house clearance
bojokey283 · 27 weeks and 5 days ago
Very nice article, I enjoyed reading your post, very nice share, I want to twit this to my followers. Thanks!. hartlepool removals
bojokey283 · 27 weeks and 5 days ago
I can see that you are an expert at your field! I am launching a website soon, and your information will be very useful for me.. Thanks for all your help and wishing you all the success in your business. Heimautomation
bojokey283 · 27 weeks and 2 days ago
Great write-up, I am a big believer in commenting on blogs to inform the blog writers know that they’ve added something worthwhile to the world wide web!.. tree surgeon in colchester
bojokey283 · 27 weeks and 2 days ago
Superbly written article, if only all bloggers offered the same content as you, the internet would be a far better place.. covid isla mujeres
bojokey283 · 26 weeks and 6 days ago
Awesome article! I want people to know just how good this information is in your article. It’s interesting, compelling content. Your views are much like my own concerning this subject. best places to snorkel in cozumel
bojokey283 · 25 weeks and 5 days ago
I can see that you are an expert at your field! I am launching a website soon, and your information will be very useful for me.. Thanks for all your help and wishing you all the success in your business. legjobb" rel="nofollow">http://www.fokuszpalyazat.hu/'>legjobb pályázatírás Debrecen
bojokey283 · 23 weeks and 1 day ago
Very amusing. Should be fun to implement. pressure cleaners sunshine coast
FLM76 · 22 weeks and 2 days ago
I am happy to find this post very useful for me, as it contains lot of information. I always prefer to read the quality content and this thing I found in you post. Thanks for sharing. rumah pintar
bojokey283 · 22 weeks and 2 days ago
I’ve been searching for some decent stuff on the subject and haven't had any luck up until this point, You just got a new biggest fan!.. kombájn szállítás vágóasztallal
bojokey283 · 21 weeks and 3 days ago
I can see that you are an expert at your field! I am launching a website soon, and your information will be very useful for me.. Thanks for all your help and wishing you all the success in your business. 5 star resort cozumel
bojokey283 · 21 weeks and 3 days ago
I know your expertise on this. I must say we should have an online discussion on this. Writing only comments will close the discussion straight away! And will restrict the benefits from this information. best place to eat in cozumel
xoheko1229 · 21 weeks and 3 days ago
I am hoping the same best effort from you in the future as well. In fact your creative writing skills has inspired me. best place to eat in cozumel
xoheko1229 · 21 weeks and 2 days ago
Great write-up, I am a big believer in commenting on blogs to inform the blog writers know that they’ve added something worthwhile to the world wide web!.. all inclusive cozumel trips
bojokey283 · 21 weeks and 2 days ago
Brilliant! I like to know more about command and other techniques. -SAM | https://massagewestport.com
vassist960 · 21 weeks ago
I wanted to thank you for this great read!! I definitely enjoying every little bit of it I have you bookmarked to check out new stuff you post. where is cozumel island
xoheko1229 · 20 weeks and 5 days ago
I wanted to thank you for this great read!! I definitely enjoying every little bit of it I have you bookmarked to check out new stuff you post. yuctana food
xoheko1229 · 20 weeks and 5 days ago
This is truly a great read for me. I have bookmarked it and I am looking forward to reading new articles. Keep up the good work!. tulum resorts all inclusive adults only
xoheko1229 · 20 weeks and 5 days ago
Wonderful article, thanks for putting this together! This is obviously one great post. Thanks for the valuable information and insights you have so provided here. tulum top restaurants
xoheko1229 · 20 weeks and 4 days ago
Please let me know if you’re looking for a article writer for your site. You have some really great posts and I feel I would be a good asset. If you ever want to take some of the load off, I’d absolutely love to write some material for your blog in exchange for a link back to mine. Please send me an email if interested. Thank you! top hotels in playa del carmen
xoheko1229 · 20 weeks and 2 days ago
Please let me know if you’re looking for a article writer for your site. You have some really great posts and I feel I would be a good asset. If you ever want to take some of the load off, I’d absolutely love to write some material for your blog in exchange for a link back to mine. Please send me an email if interested. Thank you! top restaurants holbox
xoheko1229 · 19 weeks and 6 days ago
Great articles and great layout. Your blog post deserves all of the positive feedback it’s been getting. treatnheal
xoheko1229 · 18 weeks ago
Positive site, where did u come up with the information on this posting?I have read a few of the articles on your website now, and I really like your style. Thanks a million and please keep up the effective work. Automatyka hoteli
xoheko1229 · 17 weeks and 5 days ago
Great write-up, I am a big believer in commenting on blogs to inform the blog writers know that they’ve added something worthwhile to the world wide web!.. luxury bathroom vanity
bojokey283 · 16 weeks and 5 days ago
Great write-up, I am a big believer in commenting on blogs to inform the blog writers know that they’ve added something worthwhile to the world wide web!.. coronavirus mexico
bojokey283 · 15 weeks and 4 days ago
I have not any word to appreciate this post.....Really i am impressed from this post....the person who create this post it was a great human..thanks for shared this with us. covid yucatan
bojokey283 · 15 weeks and 3 days ago
Most of the time I don’t make comments on websites, but I'd like to say that this article really forced me to do so. Really nice post! What to do in Hualien
bojokey283 · 15 weeks and 1 day ago
Thanks for sharing your worth-reading content, you made it simple and vividly understand. I will definitely try this. Ryan | Landscaping San Bernardino
vassist960 · 14 weeks and 2 days ago
I know your expertise on this. I must say we should have an online discussion on this. Writing only comments will close the discussion straight away! And will restrict the benefits from this information. Chimney
bojokey283 · 13 weeks and 5 days ago
Great write-up, I am a big believer in commenting on blogs to inform the blog writers know that they’ve added something worthwhile to the world wide web!.. Bank instruments provider
bojokey283 · 12 weeks and 3 days ago
I can see that you are an expert at your field! I am launching a website soon, and your information will be very useful for me.. Thanks for all your help and wishing you all the success in your business. Stahlwandpool
bojokey283 · 12 weeks and 2 days ago
I appreciate everything you have added to my knowledge base.Admiring the time and effort you put into your blog and detailed information you offer.Thanks. Cat Breeders In USA
bojokey283 · 9 weeks and 2 days ago
I wanted to thank you for this great read!! I definitely enjoying every little bit of it I have you bookmarked to check out new stuff you post. things to do in cozumel
xoheko1229 · 7 weeks and 2 days ago
This is such a great resource that you are providing and you give it away for free. I love seeing websites that understand the value of providing a quality resource for free. It is the old what goes around comes around routine. Europa-Road mobilház szállítás
xoheko1229 · 6 weeks and 6 days ago
Your content is nothing short of brilliant in many ways. I think this is engaging and eye-opening material. Thank you so much for caring about your content and your readers. Private boat charter St Thomas
xoheko1229 · 6 weeks and 4 days ago
I would like to say that this blog really convinced me to do it! Thanks, very good post. Gestione documenti open source
xoheko1229 · 5 weeks and 3 days ago
This is very educational content and written well for a change. It's nice to see that some people still understand how to write a quality post.! recruiting software
xoheko1229 · 5 weeks ago
Pretty good post. I just stumbled upon your blog and wanted to say that I have really enjoyed reading your blog posts. Any way I'll be subscribing to your feed and I hope you post again soon. Big thanks for the useful info. Osteopathie
xoheko1229 · 3 weeks and 3 days ago
I really thank you for the valuable info on this great subject and look forward to more great posts. Thanks a lot for enjoying this beauty article with me. I am appreciating it very much! Looking forward to another great article. Good luck to the author! All the best! unabhängiger Finanzberater
xoheko1229 · 3 weeks ago
I felt very happy while reading this site. This was really very informative site for me. I really liked it. This was really a cordial post. Thanks a lot!. mua hàng trên mercari
xoheko1229 · 2 weeks and 4 days ago
This is a great post. I like this topic.This site has lots of advantage.I found many interesting things from this site. It helps me in many ways.Thanks for posting this again. dizajnovy blog
xoheko1229 · 3 days ago
I'm glad I found this web site, I couldn't find any knowledge on this matter prior to.Also operate a site and if you are ever interested in doing some visitor writing for me if possible feel free to let me know, i am always look for people to check out my web site. ????????
xoheko1229 · 1 day ago

What do you think?

Any thoughts on this command? Does it work on your machine? Can you do the same thing with only 14 characters?

You must be signed in to comment.

What's this?

commandlinefu.com is the place to record those command-line gems that you return to again and again. That way others can gain from your CLI wisdom and you from theirs too. All commands can be commented on, discussed and voted up or down.

Share Your Commands



Stay in the loop…

Follow the Tweets.

Every new command is wrapped in a tweet and posted to Twitter. Following the stream is a great way of staying abreast of the latest commands. For the more discerning, there are Twitter accounts for commands that get a minimum of 3 and 10 votes - that way only the great commands get tweeted.

» http://twitter.com/commandlinefu
» http://twitter.com/commandlinefu3
» http://twitter.com/commandlinefu10

Subscribe to the feeds.

Use your favourite RSS aggregator to stay in touch with the latest commands. There are feeds mirroring the 3 Twitter streams as well as for virtually every other subset (users, tags, functions,…):

Subscribe to the feed for: