11
6
I'm trying to figure out how I can customize my terminal's bash prompt to use smiley faces. What I want (as seen in the example blow) is for the cwd to be separated from the prompt by a \n and show a green smiley face if the command succeeded, and a red sad face if it failed.
Any ideas?
This was inspired by a Peepcode screencast.
Awesome work on the if/then sample. I'm curious how to do the newline, remove the
$
, actually use the Unicode symbol, and make it show the fullcwd
. – Josh Smith – 2011-12-16T02:27:06.850...and an hour later, answered my own question (thanks to you!). – Josh Smith – 2011-12-16T03:26:15.677
1Glad I could help! There's a lot of info in the thread at the link I posted above if you want to get deeper into custom
$PS1
stuff. – jake-low – 2011-12-16T04:24:10.013Yeah, half of my research started at that thread. Super helpful. Also, for anyone that wants to go more in-depth on the command line, Peepcode has a great advanced screencast. – Josh Smith – 2011-12-21T18:14:12.887