]> git.pld-linux.org Git - projects/setup.git/commitdiff
- added setting of xterm-window title for bash and zsh. TODO: ksh*
authorPaweł Gołaszewski <blues@pld-linux.org>
Mon, 15 Sep 2003 14:00:47 +0000 (14:00 +0000)
committerPaweł Gołaszewski <blues@pld-linux.org>
Mon, 15 Sep 2003 14:00:47 +0000 (14:00 +0000)
Changed files:
    etc/profile -> 1.29

etc/profile

index 5c2ce8e6384ce1bbf83de8db1b29119c0ebd5db3..3575dccc358ad2029cac71f3a127feb1c02e19f7 100644 (file)
@@ -50,7 +50,14 @@ fi
 
 case "$SH" in
   bash)
-       PS1="[\u@\h \W]\\$ "
+       case $TERM in
+               xterm*)
+                       PS1="\[\033]0;\u@\h: \w\007\][\u@\h \W]\\$ "
+                       ;;
+               *)
+                       PS1="[\u@\h \W]\\$ "
+                       ;;
+       esac
        ;;
   ksh|pdksh)
        if [ `id -u` -eq 0 ]; then
@@ -137,6 +144,9 @@ case "$SH" in
                bindkey '^[[D' backward-char >/dev/null 2>&1
                bindkey '^[[C' forward-char >/dev/null 2>&1
                ;;
+       xterm*)
+               precmd () { print -Pn "\e]0;%n@%m: %~\a"i; }
+               ;;
        esac
        # other HISTFILE, zsh uses diffrent fmt
        HISTFILE=~/.historyz
This page took 0.133049 seconds and 4 git commands to generate.