Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: zsh prompt not updating until first 'chdir'
- X-seq: zsh-users 7433
- From: Timothy Luoma <luomat@xxxxxxxx>
- To: Dan Nelson <dnelson@xxxxxxxxxxxxxxx>
- Subject: Re: zsh prompt not updating until first 'chdir'
- Date: Sun, 2 May 2004 20:41:28 -0400
- Cc: zsh-users@xxxxxxxxxx
- In-reply-to: <20040501233214.GD10166@xxxxxxxxxxxxxxxx>
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
- References: <opr7bvrajhb19zj4@localhost> <20040501233214.GD10166@xxxxxxxxxxxxxxxx>
On May 1, 2004, at 7:32 PM, Dan Nelson wrote:
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 :)
Sssh!! It was one of the reasons I said I had to get a Mac ;-)
Actually I just installed Cygwin not too long ago, but it just made me
want to get a real Unix machine again.
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?
PROMPT="
---------------------------------%t/%T ---------------------------------
%S[OLDPWD: $dirstack[1]]
[PWD: %~]%s
$SHORT_HOST> "
works great EXCEPT that OLDPWD doesn't get updated
TjL
Messages sorted by:
Reverse Date,
Date,
Thread,
Author