From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2063 invoked from network); 6 Aug 2001 13:15:32 -0000 Received: from sunsite.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 6 Aug 2001 13:15:32 -0000 Received: (qmail 19907 invoked by alias); 6 Aug 2001 13:15:11 -0000 Mailing-List: contact zsh-users-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 4089 Received: (qmail 19896 invoked from network); 6 Aug 2001 13:15:10 -0000 From: "Markus Wilke" To: Subject: Re: hostname in prompt Date: Mon, 6 Aug 2001 14:09:13 +0200 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 8bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2911.0) Importance: Normal X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200 >> 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@bristol.st.com---------www.superh.com-------------www.st.com---- >and by night >>---richard.curnow@go.to---http://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@temf.tu-darmstadt.de www: www.temf.de ------------------------------------------------------------------------ Hi, I´m a .signature antivirus, copy me in your ~/.signature file to protect your system. ========================================================================