changeset 60:be4d0b045487

[bash] LOGNAME instead of USER since the former is more widely available (ie. USER is not set after `sudo su -` on solaris).
author Edho Prima Arief <me@myconan.net>
date Thu, 05 May 2011 01:13:58 +0700
parents 757576a3fa79
children 81d132d8c757 996aa2f81721 29bd7f6ef58a
files bash
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/bash	Thu May 05 00:58:13 2011 +0700
+++ b/bash	Thu May 05 01:13:58 2011 +0700
@@ -64,7 +64,7 @@
 
 case "${TERM}" in
   xterm*|screen*|dtterm)
-    PROMPT_COMMAND='echo -ne "\033]0;${USER}@${HOSTNAME}: ${PWD}\007"'
+    PROMPT_COMMAND='echo -ne "\033]0;${LOGNAME}@${HOSTNAME}: ${PWD}\007"'
   ;;
 esac