summaryrefslogtreecommitdiff
path: root/net:sweethome
diff options
context:
space:
mode:
authorHugues Hiegel <hugues@hiegel.fr>2009-05-14 14:33:08 +0200
committerHugues Hiegel <hugues@hiegel.fr>2009-05-14 14:33:08 +0200
commit3140ebd0f5f6110ec8ba2b271be8595393b59aca (patch)
treed0c73c31245a51b18b93899ccabf6858907e92d5 /net:sweethome
parent80f100583ebe1a4a2856dcac593e7e1ed63260c9 (diff)
[Colors] simplification of PS1_USER colors, and moved them into Environment
Diffstat (limited to 'net:sweethome')
-rw-r--r--net:sweethome/host:prunelle/Environment.zsh1
-rw-r--r--net:sweethome/user:hugues/Environment.zsh19
2 files changed, 19 insertions, 1 deletions
diff --git a/net:sweethome/host:prunelle/Environment.zsh b/net:sweethome/host:prunelle/Environment.zsh
index 876fb90..248b742 100644
--- a/net:sweethome/host:prunelle/Environment.zsh
+++ b/net:sweethome/host:prunelle/Environment.zsh
@@ -27,7 +27,6 @@ then
fi
PS1_USER="1"
-PS1_USER_SSH="$PS1_USER"
if [ "$OSTYPE" = "linux-gnu" ]
then
PS1_ROOT="31"
diff --git a/net:sweethome/user:hugues/Environment.zsh b/net:sweethome/user:hugues/Environment.zsh
new file mode 100644
index 0000000..22ede24
--- /dev/null
+++ b/net:sweethome/user:hugues/Environment.zsh
@@ -0,0 +1,19 @@
+
+PS1_SUDO=${PS1_SUDO:-$color[green]}
+PS1_USER_SSH=${PS1_USER_SSH:-$color[magenta]}
+#PS1_USER_SCR=${PS1_USER_SCR:-$color[cyan]}
+PS1_USER_SCR=$PS1_USER
+
+if ( [ "$SSH_TTY" != "" ] )
+then
+ PS1_USER=$PS1_USER_SSH
+fi
+if ( echo "$TERM" | grep "^screen.*$" >/dev/null )
+then
+ PS1_USER=$PS1_USER_SCR
+fi
+if ( [ ! -z "$SUDO_USER" ] )
+then
+ PS1_USER=$PS1_SUDO
+fi
+