Bo Ørsted Andresen <bo.andresen <at> zlin.dk> writes:

> To get only the hostname (\h is substituted with the hostname as you can read
> in `man bash`) ...

> # export PS1=$PS1'\[\033]0;\h\007\]'

Well I tryied this command by puting it in the .bashrc file on both
the host system and the target remote. It did not alter the
kde-session-tab at all. Then I tried just issuing the command
from the CLI and it did nothing either. So I'm not sure
I'm trying this solution as intended.


> Or for the ip you can try this evil command... ;) (it depends on
> sys-apps/iproute2 and will be overridden by $PS1 -- try in another terminal if
> you just typed the above command) ...
> 
> # export PROMPT_COMMAND="ip -o -4 addr show scope global | sed -r 's/.*
([12]?[0-9]?[0-9](\.[12]?[0-9]?[0-9]){3})\/.*/\x1b]0;\1\x7/'"

>From the command line I get this error:
bash: ip: command not found

> Anyway, what's wrong with Mike Williams' suggestion? That's works fine for me.

OK, I'm going to respond to this, directly from Mike's email. I had
not gotten around to trying what he suggested, yet.


James






-- 
gentoo-user@gentoo.org mailing list

Reply via email to