KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
I'm trying to get my iTerm prompt set up the same way as Paul Irish So far I have the following in ~/.profile : # Add git branch name to prompt parse_git_branch() { git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/*\(.*\)/ on \1/' } PS1='\n\[\033[0:35m\]\u\[\033[0;32m\]\w\[033[0m\]$(parse_git_branch)\n\$\[\033[0m\] ' I don't know how to make just the branch appear in a different colour and not the preceding "on" As well as this there are other features such as: Displaying an "o" at the prompt when not in a git branch Displaying a "±" when in a branch Displaying the date at the end of the line Any help would be appreciated
Tags (comma-separated)
Save Edits
Cancel