From: Clint Adams <schizo@debian.org>
To: Ben Pearre <bwpearre@alumni.princeton.edu>
Cc: zsh-users@sunsite.dk
Subject: Re: Bug in zsh-4.2.0-4?
Date: Tue, 20 Apr 2004 10:07:02 -0400 [thread overview]
Message-ID: <20040420140702.GC3113@scowler.net> (raw)
In-Reply-To: <20040420012700.GA4401@bach.cs.colorado.edu>
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!
parent reply other threads:[~2004-04-20 14:07 UTC|newest]
Thread overview: expand[flat|nested] mbox.gz Atom feed
[parent not found: <20040420012700.GA4401@bach.cs.colorado.edu>]
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=20040420140702.GC3113@scowler.net \
--to=schizo@debian.org \
--cc=bwpearre@alumni.princeton.edu \
--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).