parent
2a6d1da317
commit
09dfe7552c
|
|
@ -9,6 +9,7 @@ DEFAULT_COLOR='\[${white}\]'
|
||||||
USER_COLOR='\[${purple}\]'
|
USER_COLOR='\[${purple}\]'
|
||||||
SUPERUSER_COLOR='\[${red}\]'
|
SUPERUSER_COLOR='\[${red}\]'
|
||||||
MACHINE_COLOR=$ORANGE
|
MACHINE_COLOR=$ORANGE
|
||||||
|
IP_COLOR=$MACHINE_COLOR
|
||||||
DIRECTORY_COLOR='\[${bold_green}\]'
|
DIRECTORY_COLOR='\[${bold_green}\]'
|
||||||
|
|
||||||
VE_COLOR='\[${red}\]'
|
VE_COLOR='\[${red}\]'
|
||||||
|
|
@ -35,6 +36,10 @@ SVN_THEME_PROMPT_SUFFIX='|'
|
||||||
|
|
||||||
# Use http://geoff.greer.fm/lscolors/
|
# Use http://geoff.greer.fm/lscolors/
|
||||||
|
|
||||||
|
function ip {
|
||||||
|
echo $(ifconfig en1 | grep "inet " | awk '{ print $2 }')
|
||||||
|
}
|
||||||
|
|
||||||
# Override function scm
|
# Override function scm
|
||||||
function scm {
|
function scm {
|
||||||
if [[ -d .git ]]; then SCM=$GIT
|
if [[ -d .git ]]; then SCM=$GIT
|
||||||
|
|
@ -160,7 +165,7 @@ function prompt() {
|
||||||
local UC=$USER_COLOR
|
local UC=$USER_COLOR
|
||||||
[ $UID -eq "0" ] && UC=$SUPERUSER_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='> '
|
PS2='> '
|
||||||
PS4='+ '
|
PS4='+ '
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue