From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19198 invoked from network); 20 Apr 2004 14:07:56 -0000 Received: from sunsite.dk (130.225.247.90) by ns1.primenet.com.au with SMTP; 20 Apr 2004 14:07:56 -0000 Received: (qmail 3964 invoked by alias); 20 Apr 2004 14:07:33 -0000 Mailing-List: contact zsh-users-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 7374 Received: (qmail 3948 invoked from network); 20 Apr 2004 14:07:32 -0000 Received: from localhost (HELO sunsite.dk) (127.0.0.1) by localhost with SMTP; 20 Apr 2004 14:07:32 -0000 X-MessageWall-Score: 0 (sunsite.dk) Received: from [130.225.247.86] by sunsite.dk (MessageWall 1.0.8) with SMTP; 20 Apr 2004 14:7:32 -0000 Received: (qmail 25662 invoked from network); 20 Apr 2004 14:07:32 -0000 Received: from acolyte.scowler.net (216.254.112.45) by a.mx.sunsite.dk with SMTP; 20 Apr 2004 14:07:30 -0000 Received: by acolyte.scowler.net (Postfix, from userid 1000) id 561637004A; Tue, 20 Apr 2004 10:07:02 -0400 (EDT) Date: Tue, 20 Apr 2004 10:07:02 -0400 From: Clint Adams To: Ben Pearre Cc: zsh-users@sunsite.dk Subject: Re: Bug in zsh-4.2.0-4? Message-ID: <20040420140702.GC3113@scowler.net> References: <20040420012700.GA4401@bach.cs.colorado.edu> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20040420012700.GA4401@bach.cs.colorado.edu> User-Agent: Mutt/1.5.5.1+cvs20040105i X-Spam-Checker-Version: SpamAssassin 2.63 on a.mx.sunsite.dk X-Spam-Level: X-Spam-Status: No, hits=0.0 required=6.0 tests=none autolearn=no version=2.63 X-Spam-Hits: 0.0 Are there any jobs at all in your job table when you experience this problem? On Mon, Apr 19, 2004 at 07:27:00PM -0600, Ben Pearre wrote: > Hi... I'm running the latest debian unstable, including zsh 4.2.0-4. > An instance of zsh will work fine for a while, and then start doing > this on every command: > > (0)# cd > preexec:1: job table full > precmd:1: job table full > > The command runs, but the preexec and precmd scripts don't. Here is > what they are defined to (just FYI; simpler examples follow): You can avoid the problem by not using command substitutions at all. > SHOST=`echo $HOST | cut -d. -f1` > PS1='%B(%?)%#%b ' > precmd () { > EPWD=`pwd | sed 's/\/home\/ben/~/g'` > echo -ne "\033]0;${SHOST} ${EPWD}\007" > } > preexec () { > EPWD=`pwd | sed 's/\/home\/ben/~/g'` > echo -ne "\033]0;$1 (${SHOST} ${EPWD})\007" > } Try PS1='%B(%?)%#%b ' precmd () { print -nP "\033]0;${HOST%%.*} %~\007" } preexec () { print -nP "\033]0;$1 (${HOST%%.*} %~)\007" } If you actually want the behavior of changing /home/ben to ~, rather than what %~ does, you can change the occurrences of %~ above to ${PWD/\/home\/ben/\~} Either way, that's going to be more efficient than actually running pwd and sed and cut. > Once the problem starts, I can redefine, say, precmd to something that > does not include a variable assignment: > > precmd () { > pwd | sed 's/\/home\/ben/~/g' > } > > The error goes away. But as soon as I assign the output of a command > to a shell variable > > precmd () { > A=`pwd` > } > > the problem comes back immediately. > > If I can be useful in debugging this, please tell me what to do!