changeset 257:adcea08f6807

Always correct username, static hostname.
author Edho Arief <edho@myconan.net>
date Wed, 16 Nov 2011 22:31:35 +0000
parents 227f4d463b5d
children 0cd601956a9a
files rc/bash
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/rc/bash	Tue Nov 15 12:10:28 2011 +0700
+++ b/rc/bash	Wed Nov 16 22:31:35 2011 +0000
@@ -107,7 +107,7 @@
 
 case "${TERM}" in
   xterm*|screen*|dtterm*)
-    PROMPT_COMMAND='echo -ne "\033]0;${LOGNAME}@${HOSTNAME}: ${PWD}\007";'"${PROMPT_COMMAND}"
+    PROMPT_COMMAND='echo -ne "\033]0;'"$(id -un)@$(uname -n)"': ${PWD}\007";'"${PROMPT_COMMAND}"
     PS1='[\[\e[0;33m\]\u\[\e[0m\]@\[\e[0;32m\]\h\[\e[0m\] \[\e[1;34m\]\W\[\e[0m\]]\$ '
   ;;
   *)