diff --git a/nixhome/.bashrc b/nixhome/.bashrc index d1abd3f..d60f4df 100644 --- a/nixhome/.bashrc +++ b/nixhome/.bashrc @@ -124,10 +124,18 @@ esac # - `7`: White # others: # \w shows absolute path, \W shows current folder. + +if [ "$(uname)" = "Darwin" ]; then + MYOSVERSION=mac`sw_vers -productVersion` +elif [ -f /etc/debian_version ]; then + MYOSVERSION=deb`cat /etc/debian_version 2>/dev/null` +elif [ -f /etc/ubuntu_version ]; then + MYOSVERSION=ubt`cat /etc/ubuntu_version 2>/dev/null` +fi if [ "$color_prompt" = yes ]; then - PS1='[\[\033[07;32m\]\t\[\033[00m\]#\[\033[07;35m\]\u\[\033[00m\]@\[\033[07;31m\]\h[$(uname),$(uname -m)]\[\033[00m\]::\[\033[07;34m\]\w\[\033[00m\]] ' + PS1='[\[\033[07;32m\]\t\[\033[00m\]#\[\033[07;35m\]\u\[\033[00m\]@\[\033[07;31m\]\h=$(uname -m),$(uname),$MYOSVERSION\[\033[00m\]::\[\033[07;34m\]\w\[\033[00m\]] ' else - PS1='[\t#\u@\h($(uname),$(uname -m)):\w] ' # \w shows absolute path, \W shows current folder. + PS1='[\t#\u@\h=$(uname -m),$(uname),$MYOSVERSION::\w] ' # \w shows absolute path, \W shows current folder. fi unset color_prompt force_color_prompt