Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: hostname in prompt

>> Hello everyone,
>> I updated my zsh-3.1.9 to 4.0.2 on a Solaris 2.6 box, but now my prompt
>> not working correctly any more. I have the hostname in the prompt, and
>> instead of the hostname "SunOS" appears (regardless on what solaris
>> zsh runs).

>I have the hostname successfully appearing in my prompt.  In my .zshrc
there is

>PROMPT="%t-%m-%?-%h-%# "
>if [ ${+CLEARCASE_ROOT} = 1 ]; then
>    RPROMPT=" [${VIEWNAME}]-%60<\<**<%~"
>    RPROMPT=" %80<\<**<%~"

>So at the left margin I have
>- time of day
>- hostname
>- exit status of last cmd
>- history entry number
>- % or #

>and at the right margin I have the tail of the current directory name,
>with the ClearCase view I'm in inside [..] if I am actually inside a view.

>Are you using the hostname command rather than %m to try to do this?

>Richard Curnow---by day : SuperH Core Architecture at STMicroelectronics
>and by night >>---richard.curnow@xxxxxxxxxxxx://go.to/richard.curnow/---

No, I am using %m:

RPROMPT=$'%{\e[1;31m%}[%m]%{\e[0m%}'      # prompt for right side of screen

(the escape sequences are for colouring the prompt).

BTW, of course the command hostname works fine. My prompts also worked fine
in zsh-3.1.9.
Debugging zsh is quite hard for me, because of the hash table stuff inside,
so I didn't get any clues in this way.

Any more ideas?

  Dipl.-Ing. Markus Wilke
  Darmstadt Univ. of Technology, FG Theorie Elektromagnetischer Felder
  Schlossgartenstr. 8, D-64289 Darmstadt, Germany
  fon:  +49 6151 162361                           fax: +49 6151 164611
  mail: wilke@xxxxxxxxxxxxxxxxxxxx                www:     www.temf.de
  Hi, I´m a .signature antivirus, copy me in your ~/.signature file to
  protect your system.

Messages sorted by: Reverse Date, Date, Thread, Author