From 81f891e4c144e31416a505adc08ad2c0b03444d5 Mon Sep 17 00:00:00 2001 From: Hugues Hiegel Date: Mon, 20 Apr 2009 13:43:32 +0200 Subject: [Funcs] show sudoed user in screen title --- 01_Functions.zsh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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\\" ;; *) ;; -- cgit v1.2.3