Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: zsh prompt not updating until first 'chdir'
- X-seq: zsh-users 7436
- From: Oliver Kiddle <okiddle@xxxxxxxxxxx>
- To: Timothy Luoma <luomat@xxxxxxxx>
- Subject: Re: zsh prompt not updating until first 'chdir'
- Date: Mon, 03 May 2004 08:55:22 +0200
- Cc: zsh-users@xxxxxxxxxx
- In-reply-to: <9D0A9896-9C9A-11D8-B220-000D93AD26C8@xxxxxxxx>
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
- References: <opr7bvrajhb19zj4@localhost> <20040501233214.GD10166@xxxxxxxxxxxxxxxx> <9D0A9896-9C9A-11D8-B220-000D93AD26C8@xxxxxxxx>
Timothy Luoma wrote:
>
> > in your .zshrc directly, setopt prompt_subst, and forget about
> > resetting it every time you cd?
>
> PROMPT="
> ---------------------------------%t/%T ---------------------------------
> %S[OLDPWD: $dirstack[1]]
> [PWD: %~]%s
> $SHORT_HOST> "
>
> works great EXCEPT that OLDPWD doesn't get updated
Use single quotes instead of double quotes (and don't forget the
prompt_subst option). With double quotes, the variables are expanded
straightaway which is why they don't update.
Oliver
Messages sorted by:
Reverse Date,
Date,
Thread,
Author