]> code.delx.au - dotfiles/commitdiff
Set screen window titles automatically
authorJames Bunton <jamesbunton@delx.net.au>
Wed, 3 Oct 2007 01:11:54 +0000 (11:11 +1000)
committerJames Bunton <jamesbunton@delx.net.au>
Wed, 3 Oct 2007 01:11:54 +0000 (11:11 +1000)
.bash/interactive

index 614249bc096dc62e744f54c66c5ec3a7f13f554b..3ccb4eb369e894b8ca84de00ff23263bf65aef2e 100644 (file)
@@ -2,6 +2,12 @@
 
 # Sets up the shell for interactive commands
 
+# Prompt: user@host:directory$
+PS1='\u@\h:\w\$ '
+
+# The all important colours!
+ssource "${HOME}/.bash/colors"
+
 # xterm titlebar displays current command
 case "${TERM}" in
 xterm*|rxvt*)
@@ -10,13 +16,13 @@ xterm*|rxvt*)
        PROMPT_COMMAND="echo -ne \"\033]0;${HOSTNAME}: ${CWD_WITHHOME}\007\""
        unset HOSTNAME
        ;;
+screen*)
+       PS1="\033k\033\\\\${PS1}"
+       ;;
 *)
        ;;
 esac
 
-# Prompt: user@host:directory$
-PS1='\u@\h:\w\$ '
-
 # Useful aliases
 alias ls='ls --color=auto'
 alias ll='ls -hlF'
@@ -28,9 +34,6 @@ alias less='less -R'
 # Bash should check the terminal size after every command terminates
 shopt -s checkwinsize
 
-# The all important colours!
-ssource "${HOME}/.bash/colors"
-
 # Local customisations
 ssource "${HOME}/.bash/interactive_local"