From 09dfe7552c4b9538df85fabef855a5c7e941f5f2 Mon Sep 17 00:00:00 2001 From: Ryan Date: Tue, 31 May 2011 19:17:10 -1000 Subject: [PATCH] Added ip address (only good for a mac) :D ) --- themes/hawaii50/hawaii50.theme.bash | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/themes/hawaii50/hawaii50.theme.bash b/themes/hawaii50/hawaii50.theme.bash index 16ecf07..1a9281d 100644 --- a/themes/hawaii50/hawaii50.theme.bash +++ b/themes/hawaii50/hawaii50.theme.bash @@ -9,6 +9,7 @@ DEFAULT_COLOR='\[${white}\]' USER_COLOR='\[${purple}\]' SUPERUSER_COLOR='\[${red}\]' MACHINE_COLOR=$ORANGE +IP_COLOR=$MACHINE_COLOR DIRECTORY_COLOR='\[${bold_green}\]' VE_COLOR='\[${red}\]' @@ -35,6 +36,10 @@ SVN_THEME_PROMPT_SUFFIX='|' # Use http://geoff.greer.fm/lscolors/ +function ip { + echo $(ifconfig en1 | grep "inet " | awk '{ print $2 }') +} + # Override function scm function scm { if [[ -d .git ]]; then SCM=$GIT @@ -160,7 +165,7 @@ function prompt() { local UC=$USER_COLOR [ $UID -eq "0" ] && UC=$SUPERUSER_COLOR - PS1="$(scm_char) ${UC}\u ${DEFAULT_COLOR}at ${MACHINE_COLOR}\h${DEFAULT_COLOR} in ${DIRECTORY_COLOR}$(limited_pwd)${DEFAULT_COLOR} $(virtual_info) $(scm_info) \$ " + PS1="$(scm_char) ${UC}\u ${DEFAULT_COLOR}at ${MACHINE_COLOR}\h ${DEFAULT_COLOR}(${IP_COLOR}$(ip)${DEFAULT_COLOR})${DEFAULT_COLOR} in ${DIRECTORY_COLOR}$(limited_pwd)${DEFAULT_COLOR} $(virtual_info) $(scm_info) \$ " PS2='> ' PS4='+ ' } -- 2.17.1