For the longest time, I depended on .zshrc on the target machine to set the title in my (xterm|iTerm) window title. This has one drawback– if the target host doesn’t have my .zshrc (or support zsh), no title. And this bit me nastily the other day when I did something in the wrong window.

Enter this new .zshrc function, which works by setting the xterm title sequence:



Combine this with the following code to set your title to user@host before and after each command and you should always know who you are in a window.



RSS Trackback URL notarus | 12/15/2006 (2:46 pm)

Open Source, Software

2 Comments

Write a Comment»
  1. fjbnheipsssf

    fjbnheipsssf

    1/30/2009 | 3:51 pm

    1

    fjbnheipsssf…

    Anyway, you should do your best ;)…

  2. 2

    Good tip. I’m sure I’ve done something similar like rebooting the wrong machine. Glad this work ins Eterm, too.

Write a Comment