Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: zsh prompt not updating until first 'chdir'
- X-seq: zsh-users 7428
- From: Dan Nelson <dnelson@xxxxxxxxxxxxxxx>
- To: "Timothy J. Luoma" <luomat@xxxxxxxx>
- Subject: Re: zsh prompt not updating until first 'chdir'
- Date: Sat, 1 May 2004 18:32:15 -0500
- Cc: zsh-users@xxxxxxxxxx
- In-reply-to: <opr7bvrajhb19zj4@localhost>
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
- References: <opr7bvrajhb19zj4@localhost>
In the last episode (May 01), Timothy J. Luoma said:
> Just back on the list after a long absence (exiled to Windows for a
> few years, just bought a Mac).
There is a very nice cygwin port of zsh :)
> I'm very rusty on my ZSH skills, and hope someone can help. I have a
> $PROMPT setup in .zshenv
>
> setprompt () { PROMPT="
>
> ---------------------------------%t/%T ---------------------------------
> %S[OLDPWD: $OLDPWD]
> [PWD: %~]%s
> $SHORT_HOST> "
> }
Why not just set PROMPT to
"
---------------------------------%t/%T ---------------------------------
%S[OLDPWD: $dirstack[1]]
[PWD: %~]%s
$SHORT_HOST> "
in your .zshrc directly, setopt prompt_subst, and forget about
resetting it every time you cd?
--
Dan Nelson
dnelson@xxxxxxxxxxxxxxx
Messages sorted by:
Reverse Date,
Date,
Thread,
Author