Slash Boxes
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
More | Login | Reply
Loading... please wait.
  • Play with this: (Score:2, Interesting)

    by Robrt (1414) on 2003.11.19 1:08 (#25886) Journal
    if [ ${TERM} = "xterm" ]; then
        /usr/bin/printf "\033]1;$* \007"
        /usr/bin/printf "\033]2;$* \007"

    (but, your shell is probably doing this already, possibly in a pre-command hook.)
    • Aha! It was doing:
      PROMPT_COMMAND='echo -ne "\033]0;${USER}@${HOSTNAME%%.*}:${PWD/#$HOME/~}\007"'
      Neat little trick. Thanks, that rules.
      • Yes, the Terminal in Panther uses xterm title escapes. I noticed it a few weeks ago while a friend was logged into a work machine (which all have the appropriate trickery in a bash config file somewhere), and was wondering how long it would take for folks to notice it.

        I'm not sure if you can override it using the Terminal window inspector to set a custom title, as I don't have Panther yet. I'd hope so. (Otherwise, I suppose you could edit the config files wherever you needed to, but that's a bit tedious.)