How to translate small bash code to csh / tcsh (setting GNOME terminal title)

Posted by user1069609 on Stack Overflow See other posts from Stack Overflow or by user1069609
Published on 2012-06-10T09:58:46Z Indexed on 2012/06/10 16:40 UTC
Read the original article Hit count: 402

Filed under:
|
|
|
|

I need help to translate the following bash code to tcsh :

case $TERM in
    (xterm*)
    PROMPT_COMMAND='echo -ne "\033]0;${USER}@${HOSTNAME}\007"'
    ;;
esac

It is part of my .bashrc on all the machines which have bash as login shell. The code sets the GNOME terminal title to user@somehost (obviously with the real user name and host name). However some hosts have tcsh as login shell, so I need to translate the code into tcsh and add it to the .tcshrc .

I considered to somehow source another file with the bash code from inside the .tcshrc file, but I couldn't make it work.

© Stack Overflow or respective owner

Related posts about bash

Related posts about translate