summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHugues Hiegel <hugues@hiegel.fr>2009-04-20 13:43:32 +0200
committerHugues Hiegel <hugues@hiegel.fr>2009-04-20 13:43:32 +0200
commit81f891e4c144e31416a505adc08ad2c0b03444d5 (patch)
tree6a5777e228d7a7a311cd71b95170ace9d255e9df
parentb406b5ace4193485ab2bcb5c9e8059ddfc3f02b7 (diff)
[Funcs] show sudoed user in screen title
-rw-r--r--01_Functions.zsh5
1 files changed, 4 insertions, 1 deletions
diff --git a/01_Functions.zsh b/01_Functions.zsh
index fc49635..b2d8dfc 100644
--- a/01_Functions.zsh
+++ b/01_Functions.zsh
@@ -47,7 +47,10 @@ term_title()
print -Pn "\e]2;[SCREEN #n] ?u(u) ?%n@%m (%l) %~$@\a" # Sets hardstatus line (term title)
# caption
[ $# -gt 0 ] && shift # discards the first arg, which is the separator, if any
- print -Pn "\ek${@:-%~}\e\\"
+ print -Pn "\ek"
+ [ "$SUDO_USER" != "" ] && print -Pn "($USER) "
+ print -Pn "${@:-%~}"
+ print -Pn "\e\\"
;;
*)
;;