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

Re: hostname in prompt



On Mon, Aug 06, 2001 at 01:32:11PM +0200, wilke@xxxxxxxxxxxxxxxxxxxx wrote:
> Hello everyone,
> 
> I updated my zsh-3.1.9 to 4.0.2 on a Solaris 2.6 box, but now my prompt is
> not working correctly any more. I have the hostname in the prompt, and now
> instead of the hostname "SunOS" appears (regardless on what solaris machine
> 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
    VIEWNAME="${CLEARCASE_ROOT:t}"
    RPROMPT=" [${VIEWNAME}]-%60<\<**<%~"
else
    RPROMPT=" %80<\<**<%~"
fi

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, prefixed
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
curnowr@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
and by night >>---richard.curnow@xxxxxxxxxxxx://go.to/richard.curnow/---



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