Permalink
Browse files

Show the current hostname if we're not on a mac

  • Loading branch information...
1 parent 5b4b936 commit 9fcb2a1df404343cda9754f99296f87424ec2739 James Martin committed Mar 31, 2012
Showing with 6 additions and 2 deletions.
  1. +6 −2 bash_profile
View
@@ -1,4 +1,3 @@
-PS1="\w$ "
function random_words() {
ruby ~/Documents/work/cmrb/random_words.rb $1 | pbcopy
@@ -41,5 +40,10 @@ alias gb='git branch -rav'
# Git tab completion
source ~/.scripts/git-completion.bash
# # Show branch in status line
-PS1='[\W$(__git_ps1 " (%s)")]\$ '
+if [ `uname` == "Darwin" ]; then
+ PS1='[\W$(__git_ps1 " (%s)")]\$ '
+else
+ # add hostname if we're not on a mac
+ PS1='(\h) [\W$(__git_ps1 " (%s)")]\$ '
+fi
export PROMPT_COMMAND='echo -ne "\033]0;${PWD/#$HOME/~}\007"'

0 comments on commit 9fcb2a1

Please sign in to comment.