Mailinglist Archive: opensuse-programming (32 mails)

< Previous Next >
PS1 in color, what about a hostname too?
  • From: "Patrick B. O'Brien" <pobrien@xxxxxxxxxxx>
  • Date: Mon, 13 Dec 2004 16:53:00 -0800
  • Message-id: <6DB6E1ED582EFE45BE27468BD45B982FCB23C4@xxxxxxxxxxxxxxx>
This PS1 is cool, but I have several SuSe Boxes. I'd like my PS1 to
include my hostname too, any help? TIA!





#v+

PROMPT_COMMAND='PS1=`if test "$UID" = 0 ; then \

echo "\[\033[33;40m\]\u:\`pwd -P\` #\[\033[0m\] " ; \

else \

echo "\[\033[32;40m\]\u:\`pwd -P\` $\[\033[0m\] " ; \

fi `'

#v-

< Previous Next >
Follow Ups