File tree Expand file tree Collapse file tree 2 files changed +14
-8
lines changed
Expand file tree Collapse file tree 2 files changed +14
-8
lines changed Original file line number Diff line number Diff line change 1515
1616function _omb_theme_PROMPT_COMMAND() {
1717
18- local TITLEBAR
19- case $TERM in
20- xterm* | screen)
21- TITLEBAR=$' \1\e ]0;' $USER @${HOSTNAME%% .* } :${PWD/# $HOME / ~} $' \e\\ \2' ;;
22- * )
23- TITLEBAR= ;;
24- esac
18+ # Obtenemos IP segun el sistema operativo
19+ local IP
20+ case $OSTYPE in
21+ linux-gnu)
22+ IP=$( hostname -I | awk ' {print $1}' )
23+ ;;
24+ darwin* )
25+ IP=$( ifconfig en0 | awk ' $1=="inet" {print $2}' )
26+ ;;
27+ * )
28+ IP=" 127.0.0.1" # Default to localhost if OS is not recognized
29+ ;;
30+ esac
2531
2632 local HORA=$( date +%H)
2733 local MERIDIANO
@@ -31,7 +37,7 @@ function _omb_theme_PROMPT_COMMAND() {
3137 MERIDIANO=" am" ;
3238 fi
3339
34- PS1=$TITLEBAR " \n${_omb_prompt_gray} \T${MERIDIANO} ${_omb_prompt_green} \u ${_omb_prompt_olive} \$ {PWD} $( scm_prompt_info) \n${_omb_prompt_gray} \$ ${_omb_prompt_white} "
40+ PS1=" \n${_omb_prompt_gray} \T${MERIDIANO} ${_omb_prompt_green} \u@ $IP ${_omb_prompt_gray} \h ${_omb_prompt_olive} \$ {PWD} $( scm_prompt_info) \n${_omb_prompt_gray} \$ ${_omb_prompt_white} "
3541
3642}
3743
You can’t perform that action at this time.
0 commit comments