Depends on: tcsh
Download: .tcshrc -fragment
I was looking to customize my Konsole's title. I wasn't entirely happy with the default. I wanted `~' to be displayed when I was in my home directory and I didn't want to display my fully qualified host name.
What I wanted was the following when in my Home directory on my machine named `zoom': pablo@zoom:~
A quick Web search (keywords: xterm title escape sequence) provided the necessary escape sequence - http://tldp.org/HOWTO/Xterm-Title-3.html
Reading tcsh's man page, I found the precmd variable. The commands specified in precmd are executed before each prompt is printed. Perfect.
The .tcshrc fragment, I placed at the top of my .tcshrc file to ensure it gets executed first when a terminal is started.
The final piece is to ensure Konsole is configured to display titles:
- Start a Konsole terminal
- Left-click inside the terminal to bring up a menu of options, select Configure Current Profile ...
- Select the Tabs tab and
- Set both Tab title format: and Remote tab title format: to Window Title Set by Shell