Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: regarding login prompt
- X-seq: zsh-users 11617
- From: Peter Stephenson <pws@xxxxxxx>
- To: "ZSH Users" <zsh-users@xxxxxxxxxx>
- Subject: Re: regarding login prompt
- Date: Fri, 13 Jul 2007 14:01:51 +0100
- In-reply-to: <ecc395cb0707130555n2b2a1622r2875d90727997e15@xxxxxxxxxxxxxx>
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
- References: <ecc395cb0707130555n2b2a1622r2875d90727997e15@xxxxxxxxxxxxxx>
arnuld wrote:
> i am a BASH user who is interested in using ZSH as my daily routine
> shell. this is from my "~/.bashrc"
>
> PS1='[\u@\h \W]\$ '
>
> and my BASH prompt says: "[arnuld@arch ~] $ "
>
> so i put that PS1 entry into my "~/.zshrc" file but when i login into
> ZSH i see that prompt is simply the same as the PS1 entry and not
> like "arnuld@xxxxxxxx"
>
> 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.
--
Peter Stephenson <pws@xxxxxxx> Software Engineer
CSR PLC, Churchill House, Cambridge Business Park, Cowley Road
Cambridge, CB4 0WZ, UK Tel: +44 (0)1223 692070
To access the latest news from CSR copy this link into a web browser: http://www.csr.com/email_sig.php
To get further information regarding CSR, please visit our Investor Relations page at http://ir.csr.com/csr/about/overview
Messages sorted by:
Reverse Date,
Date,
Thread,
Author