summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHugues Hiegel <hugues@hiegel.fr>2008-03-06 11:00:04 +0100
committerHugues Hiegel <hugues@hiegel.fr>2008-04-08 11:30:28 +0200
commit217af2367f7a0cba677a0bbf2c130d45995b47be (patch)
treea4bc3ba9bf96a460b392e1eed71b1b2017936097
parent57ac3b75d2e6eebd65745640ac0a6ebd0122d8d4 (diff)
Affichage de l'@ IP au lieu du nom de la machine (vu qu'il veut rien dire)
-rw-r--r--10_Environment.zsh1
-rw-r--r--12_Prompts.zsh4
2 files changed, 3 insertions, 2 deletions
diff --git a/10_Environment.zsh b/10_Environment.zsh
index 52d72f5..ed0312d 100644
--- a/10_Environment.zsh
+++ b/10_Environment.zsh
@@ -52,4 +52,5 @@ HISTFILE=$ZDOTDIR/.history.$USER.$HOSTNAME # Pour éviter les conflits de conf
HISTSIZE=42000
SAVEHIST=42000
+LOCALIP=$(/sbin/ifconfig| grep adr: | awk '/192.168.3/ { print $2 } ' | cut -d: -f2)
diff --git a/12_Prompts.zsh b/12_Prompts.zsh
index 190b662..971cfef 100644
--- a/12_Prompts.zsh
+++ b/12_Prompts.zsh
@@ -123,7 +123,7 @@ old_precmd()
PATHSIZE=${#PATHSIZE}
[ "$DEBUG" = "yes" ] && echo
[ "$DEBUG" = "yes" ] && echo -n " Resize path / gitbranch..."
- spaceleft=`print -Pn "%n@%m $ ls -laCdtrux $(expand_text "$DATE")"`
+ spaceleft=`print -Pn "%n@$LOCALIP $ ls -laCdtrux $(expand_text "$DATE")"`
spaceleft=$(($COLUMNS - ${#spaceleft}))
#minimalpathsize=`print -Pn "../%1~"`
#minimalpathsize=${#minimalpathsize}
@@ -161,7 +161,7 @@ old_precmd()
# Note que pour le pwd, on n'affiche que les 4 derniers dossiers pour éviter
# de pourrir le fenêtre de terminal avec un prompt à rallonge.
PS1="$MAILSTAT""$ERROR"$C_$prompt_colors[bar]$_C"$HBAR""$DATE
-"$C_$prompt_colors[user]$_C"%n"$C_$prompt_colors[arob]$_C"@"$C_$prompt_colors[host]$_C"%m $CURDIR$SVNREV$GITBRANCH "$C_$prompt_colors[dies]$_C"%#"$C_$prompt_colors[cmd]$_C" "
+"$C_$prompt_colors[user]$_C"%n"$C_$prompt_colors[arob]$_C"@"$C_$prompt_colors[host]$_C"$LOCALIP $CURDIR$SVNREV$GITBRANCH "$C_$prompt_colors[dies]$_C"%#"$C_$prompt_colors[cmd]$_C" "
}