From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1509 invoked from network); 3 May 2004 00:43:01 -0000 Received: from thor.dotsrc.org (HELO a.mx.sunsite.dk) (qmailr@130.225.247.86) by ns1.primenet.com.au with SMTP; 3 May 2004 00:43:01 -0000 Received: (qmail 31981 invoked from network); 3 May 2004 00:42:30 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 3 May 2004 00:42:30 -0000 Received: (qmail 5891 invoked by alias); 3 May 2004 00:42:17 -0000 Mailing-List: contact zsh-users-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 7433 Received: (qmail 5881 invoked from network); 3 May 2004 00:42:16 -0000 Received: from thor.dotsrc.org (HELO a.mx.sunsite.dk) (qmailr@130.225.247.86) by sunsite.dk with SMTP; 3 May 2004 00:42:13 -0000 Received: (qmail 31249 invoked from network); 3 May 2004 00:42:13 -0000 Received: from a.mail.peak.org (69.59.192.41) by a.mx.sunsite.dk with SMTP; 3 May 2004 00:42:11 -0000 Received: from [63.155.216.28] (0-1pool216-28.nas11.columbus1.oh.us.da.qwest.net [63.155.216.28]) (authenticated bits=0) by a.mail.peak.org (8.12.10/8.12.8) with ESMTP id i430fVLT093755; Sun, 2 May 2004 17:41:32 -0700 (PDT) In-Reply-To: <20040501233214.GD10166@dan.emsphone.com> References: <20040501233214.GD10166@dan.emsphone.com> Mime-Version: 1.0 (Apple Message framework v613) Content-Type: text/plain; charset=US-ASCII; format=flowed Message-Id: <9D0A9896-9C9A-11D8-B220-000D93AD26C8@peak.org> Content-Transfer-Encoding: 7bit Cc: zsh-users@sunsite.dk From: Timothy Luoma Subject: Re: zsh prompt not updating until first 'chdir' Date: Sun, 2 May 2004 20:41:28 -0400 To: Dan Nelson X-Mailer: Apple Mail (2.613) X-Spam-Score: 0 () X-Scanned-By: MIMEDefang 2.39 X-Spam-Checker-Version: SpamAssassin 2.63 on a.mx.sunsite.dk X-Spam-Level: * X-Spam-Status: No, hits=1.6 required=6.0 tests=BAYES_44,RCVD_IN_NJABL, RCVD_IN_SORBS autolearn=no version=2.63 X-Spam-Hits: 1.6 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