* Re: hostname in prompt
@ 2001-08-06 12:09 Markus Wilke
0 siblings, 0 replies; 6+ messages in thread
From: Markus Wilke @ 2001-08-06 12:09 UTC (permalink / raw)
To: zsh-users
>> 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.
========================================================================
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: hostname in prompt
@ 2001-08-06 15:54 Markus Wilke
0 siblings, 0 replies; 6+ messages in thread
From: Markus Wilke @ 2001-08-06 15:54 UTC (permalink / raw)
To: zsh-users
Hi everyone,
obviously this problem is a specific one in my installation of zsh, if other
people running solaris 2.6 are troublefree.
In the meantime, I created a workaround: I use `hostname` instead of %m,
which works fine for me.
Thanks for your help,
Markus
========================================================================
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.
========================================================================
^ permalink raw reply [flat|nested] 6+ messages in thread
* hostname in prompt
@ 2001-08-06 11:32 Markus Wilke
2001-08-06 12:53 ` Richard Curnow
2001-08-06 13:02 ` Eric Smith
0 siblings, 2 replies; 6+ messages in thread
From: Markus Wilke @ 2001-08-06 11:32 UTC (permalink / raw)
To: zsh-users
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).
Had anybody else encountered this phenomena?
Thanks for any help with this matter.
========================================================================
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.
========================================================================
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: hostname in prompt
2001-08-06 11:32 Markus Wilke
@ 2001-08-06 12:53 ` Richard Curnow
2001-08-06 16:22 ` Peter Stephenson
2001-08-06 13:02 ` Eric Smith
1 sibling, 1 reply; 6+ messages in thread
From: Richard Curnow @ 2001-08-06 12:53 UTC (permalink / raw)
To: wilke; +Cc: zsh-users
On Mon, Aug 06, 2001 at 01:32:11PM +0200, wilke@temf.tu-darmstadt.de 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@bristol.st.com---------www.superh.com-------------www.st.com----
and by night >>---richard.curnow@go.to---http://go.to/richard.curnow/---
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: hostname in prompt
2001-08-06 12:53 ` Richard Curnow
@ 2001-08-06 16:22 ` Peter Stephenson
0 siblings, 0 replies; 6+ messages in thread
From: Peter Stephenson @ 2001-08-06 16:22 UTC (permalink / raw)
To: Zsh users list
Richard Curnow wrote:
> I have the hostname successfully appearing in my prompt.
I just recompiled with Solaris 2.6 and it seems to be OK, too.
> 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.
Aha. Do you have any completions for ClearCase...? We're thinking about
moving on from CVS and I don't suppose I'll be able to resist the
temptation of making completion functions if we do.
--
Peter Stephenson <pws@csr.com> Software Engineer
CSR Ltd., Unit 300, Science Park, Milton Road,
Cambridge, CB4 0XL, UK Tel: +44 (0)1223 392070
**********************************************************************
The information transmitted is intended only for the person or
entity to which it is addressed and may contain confidential
and/or privileged material.
Any review, retransmission, dissemination or other use of, or
taking of any action in reliance upon, this information by
persons or entities other than the intended recipient is
prohibited.
If you received this in error, please contact the sender and
delete the material from any computer.
**********************************************************************
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: hostname in prompt
2001-08-06 11:32 Markus Wilke
2001-08-06 12:53 ` Richard Curnow
@ 2001-08-06 13:02 ` Eric Smith
1 sibling, 0 replies; 6+ messages in thread
From: Eric Smith @ 2001-08-06 13:02 UTC (permalink / raw)
To: Markus Wilke; +Cc: zsh-users
According to Markus Wilke on Mon, Aug 06, 2001 at 01:32:11PM +0200:
| 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).
|
| Had anybody else encountered this phenomena?
I have:
[ $HOSTNAME = 'apple.fruitcom.com' ] && {
PS1="[%B%n%b@%m %c] %B `echo $WINDOW`%b $ "
}
[ $HOSTNAME = 'plum.fruitcom.com' ] && {
PS1="[%n@%B%m%b %c] %B`echo $WINDOW`%b $ "
}
the first emphasises the $USER and the second the $HOST.
In an xterm the emphasis can show up in color.
--
Eric Smith
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2001-08-06 17:00 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-08-06 12:09 hostname in prompt Markus Wilke
-- strict thread matches above, loose matches on Subject: below --
2001-08-06 15:54 Markus Wilke
2001-08-06 11:32 Markus Wilke
2001-08-06 12:53 ` Richard Curnow
2001-08-06 16:22 ` Peter Stephenson
2001-08-06 13:02 ` Eric Smith
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).