Bash?

Ruby code posted
created at 03 Jun 13:20

Edit | Back
1
2
3
4
5
6
7
8
9
10
11
<markdown>
  if [ "$TERM" != 'dumb' ] && [ -n "$BASH" ] && [ -n "$PS1" ]
  then
    if [ `/usr/bin/whoami` = 'root' ]
    then
      export PS1='\[\033[01;31m\]\h \[\033[01;34m\]\w \n\$ \[\033[00m\]'
    else
      export PS1='\[\033[01;32m\]\u@\h \[\033[01;34m\]\w \n\$ \[\033[00m\]'
    fi
  fi
</markdown>
320 Bytes in 2 ms with coderay