Article:
 |
|
bash on Mac OS X
|
| Subject: |
|
if only ... |
| Date: |
|
2004-02-25 08:09:07 |
| From: |
|
henksmets
|
|
|
|
... I could do this in bash
alias precmd 'printf "\033]0;%s @ $SHORTHOST\007" "${cwd}" | sed -e "s%$HOME%~%"'
sched +0:00 alias postcmd 'printf "\033]0;%s @ $SHORTHOST\007" "\!#"'
This gives me dynamic hostname information in the terminal information. When I ssh to a server that terminal window is easily recognisable.
|
Showing messages 1 through 3 of 3.
-
if only ...
2004-02-25 08:54:46
blalor
[View]
-
if only ...
2004-02-28 04:29:31
hysterion
[View]
-
if only ...
2004-02-27 04:04:25
henksmets
[View]
(the ESC and ^G are actually control characters I entered in with Emacs; \033 and \007 would probably work, too.)
That gives you a prompt like
[blalor@Animal ~]>and a window title likeblalor@Animal:[~]