Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the 'ultimate title bar' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
ultimate title bar
Authored by: jeremaya on Feb 07, '02 08:27:08PM
Okay, combining hysterion's arcane knowledge of XTerm title bars, and my unreasonable love of the command line utility "cut," we arrive at the ultimate title bar. The line below, when put in ~/Library/init/tcsh/aliases.mine, will put the name of your machine, followed by a colon, followed by the first 25 charachters of the most recent command. I have the terminal size set to show in my Terminal prefs, so I get something like ornithopter: less -f /dev/random 80x45 in my title bars. When typing in the line below, type the ^[ and ^G as ctrl-v, ctrl-[ and ctrl-v, ctrl-g.

sched +0:00 alias postcmd 'echo -n "^[]0; `hostname|cut -d. -f1`: `echo !# | cut -b 1-25`^G"'

[ Reply to This | # ]
ultimate title bar
Authored by: jkusnier on Feb 08, '02 02:53:10PM

adding
sched +0.00 alias precmd 'echo -n "^[]0;!#^G"'
to your ~/Library/init/tcsh/aliases.mine will display remove the last command from the title bar after the command exits



[ Reply to This | # ]
ultimate title bar
Authored by: hysterion on Feb 07, '03 08:36:52AM

This one still gives the error

[localhost:~] fz% echo $foo
foo: Undefined variable.
Faulty alias 'postcmd' removed.
foo: Undefined variable.

and in addition:

[localhost:~] fz% echo "alpha beta"
Unmatched `.
Faulty alias 'postcmd' removed.
alpha beta



[ Reply to This | # ]