From: Timothy Luoma <luomat@peak.org>
To: Dan Nelson <dnelson@allantgroup.com>
Cc: zsh-users@sunsite.dk
Subject: Re: zsh prompt not updating until first 'chdir'
Date: Sun, 2 May 2004 20:41:28 -0400 [thread overview]
Message-ID: <9D0A9896-9C9A-11D8-B220-000D93AD26C8@peak.org> (raw)
In-Reply-To: <20040501233214.GD10166@dan.emsphone.com>
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
next prev parent reply other threads:[~2004-05-03 0:43 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-05-01 14:53 Timothy J. Luoma
2004-05-01 16:14 ` Maurice
2004-05-01 17:52 ` Bart Schaefer
2004-05-03 1:30 ` Timothy J. Luoma
2004-05-01 23:32 ` Dan Nelson
2004-05-03 0:41 ` Timothy Luoma [this message]
2004-05-03 6:55 ` Oliver Kiddle
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=9D0A9896-9C9A-11D8-B220-000D93AD26C8@peak.org \
--to=luomat@peak.org \
--cc=dnelson@allantgroup.com \
--cc=zsh-users@sunsite.dk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).