Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: regarding login prompt
- X-seq: zsh-users 11774
- From: Boyd Adamson <boyd-adamson@xxxxxxx>
- To: Peter Stephenson <pws@xxxxxxx>
- Subject: Re: regarding login prompt
- Date: Wed, 15 Aug 2007 14:02:26 +1000
- Cc: "ZSH Users" <zsh-users@xxxxxxxxxx>
- In-reply-to: <200707131301.l6DD1pFF018924@xxxxxxxxxxxxxx> (Peter Stephenson's message of "Fri, 13 Jul 2007 14:01:51 +0100")
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
- References: <ecc395cb0707130555n2b2a1622r2875d90727997e15@xxxxxxxxxxxxxx> <200707131301.l6DD1pFF018924@xxxxxxxxxxxxxx>
Peter Stephenson <pws@xxxxxxx> writes:
> arnuld wrote:
>> how can i have a prompt like "[arnuld@arch ~] $ " in ZSH ?
>
> See PROMPT EXPANSION in the zshmisc manual page. The simplest answer
> is
>
> PS1='[%n%m %~]%# '
>
> but note (i) as I've written it you get a "%" rather than a "$", which
> is the zsh convention (ii) this will show the entire directory path
> with substitution and you might want e.g. only the last few segments.
> The manual will help you tailor it further.
OT: Out of interest, why is it that zsh uses the % by convention? It
seems (as a relative newcomer) to be more rooted in the bourne shell
tradition, yet the % has historically been used by csh.
I'm sure there is some history here that I'm not aware of. Sorry if this
is a FAQ.
Boyd
Messages sorted by:
Reverse Date,
Date,
Thread,
Author