Skip to content

Instantly share code, notes, and snippets.

@TRMW
Last active December 11, 2015 01:59
Show Gist options
  • Save TRMW/4527673 to your computer and use it in GitHub Desktop.
Save TRMW/4527673 to your computer and use it in GitHub Desktop.
Slightly modified version of Mark Otto's bash style (http://markdotto.com/2012/10/18/terminal-hotness/) to prevent the wrapping problem discussed here (http://serverfault.com/questions/83382/fix-for-bash-line-wrapping-backspace-display-bugs-on-mac-os-x). I just wrapped the whole in thing in \[ and \].
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\]'
@latenightbj
Copy link

any idea why when I delete text, the entire line of text disappears?
if I hit return, the point up until where I had deleted is input, but that input text is not visible .
It generally applies to the first word input in the CLI, not any following spaces after the first word.
Thanks for the mod though !!

@bylatt
Copy link

bylatt commented Feb 14, 2013

Same problem as @bjgodinez. Are there anyway to fix this problem.

@bylatt
Copy link

bylatt commented Feb 17, 2013

@bjgodinez Now I can fix this problem by adding some symbols to the end of the line. So I created my gist to show you here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment