Improved Terminal hotness

A few months ago (!) I wrote about customizing your Terminal prompt. It would seem I had a bug in there that caused some awful wrapping in Terminal, but fret not, there is a solution. Matt Wright was kind enough to hit me up with a fix, so here are the…


This content originally appeared on @mdo and was authored by Mark Otto

A few months ago (!) I wrote about customizing your Terminal prompt. It would seem I had a bug in there that caused some awful wrapping in Terminal, but fret not, there is a solution. Matt Wright was kind enough to hit me up with a fix, so here are the new goods with instructions on how to update.

As you recall, here’s what we’re going for with our new Terminal prompt:

New Terminal prompt

To get us there, open ~/.bash_profile. If you already have a modified prompt, replace the existing similar line with this new snippet. If you don’t have one yet, just add the following snippet:

export PS1='\[\e[0:35m⌘\e[m \e[0:36m\w/\e[m \e[0:33m`git branch 2> /dev/null | grep -e ^* | sed -E  s/^\\\\\*\ \(.+\)$/\(\\\\\1\)\ /`\e[m\]'

Save and restart Terminal. Enjoy!


This content originally appeared on @mdo and was authored by Mark Otto


Print Share Comment Cite Upload Translate Updates
APA

Mark Otto | Sciencx (2013-01-13T00:00:00+00:00) Improved Terminal hotness. Retrieved from https://www.scien.cx/2013/01/13/improved-terminal-hotness/

MLA
" » Improved Terminal hotness." Mark Otto | Sciencx - Sunday January 13, 2013, https://www.scien.cx/2013/01/13/improved-terminal-hotness/
HARVARD
Mark Otto | Sciencx Sunday January 13, 2013 » Improved Terminal hotness., viewed ,<https://www.scien.cx/2013/01/13/improved-terminal-hotness/>
VANCOUVER
Mark Otto | Sciencx - » Improved Terminal hotness. [Internet]. [Accessed ]. Available from: https://www.scien.cx/2013/01/13/improved-terminal-hotness/
CHICAGO
" » Improved Terminal hotness." Mark Otto | Sciencx - Accessed . https://www.scien.cx/2013/01/13/improved-terminal-hotness/
IEEE
" » Improved Terminal hotness." Mark Otto | Sciencx [Online]. Available: https://www.scien.cx/2013/01/13/improved-terminal-hotness/. [Accessed: ]
rf:citation
» Improved Terminal hotness | Mark Otto | Sciencx | https://www.scien.cx/2013/01/13/improved-terminal-hotness/ |

Please log in to upload a file.




There are no updates yet.
Click the Upload button above to add an update.

You must be logged in to translate posts. Please log in or register.