From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from euclid.skiles.gatech.edu (list@euclid.skiles.gatech.edu [130.207.146.50]) by melb.werple.net.au (8.7.5/8.7.3/2) with ESMTP id TAA13276 for ; Tue, 11 Jun 1996 19:36:45 +1000 (EST) Received: (from list@localhost) by euclid.skiles.gatech.edu (8.7.3/8.7.3) id FAA09469; Tue, 11 Jun 1996 05:15:15 -0400 (EDT) Resent-Date: Tue, 11 Jun 1996 05:15:15 -0400 (EDT) Message-Id: <199606110914.LAA21011@hydra.ifh.de> To: zsh-workers@math.gatech.edu (Zsh hackers list) Subject: Re: % bug in beta20-test1 In-reply-to: "mason@werple.net.au"'s message of "Sat, 08 Jun 1996 02:17:14 MET." <199606071617.QAA14781@werple.net.au> Date: Tue, 11 Jun 1996 11:14:14 +0200 From: Peter Stephenson Resent-Message-ID: <"CFyhC2.0.qJ2.UaJln"@euclid> Resent-From: zsh-workers@math.gatech.edu X-Mailing-List: archive/latest/1328 X-Loop: zsh-workers@math.gatech.edu Precedence: list Resent-Sender: zsh-workers-request@math.gatech.edu mason@werple.net.au wrote: > % % > zsh: command not found: fg This is supposed to fixed this (plus the same bug which occurred with autoresume). > I also had it not recognising "fg", and had to do "builtin fg" though I > can't reproduce that at the moment. It's assumed not to fix this. *** Src/exec.c.fg Tue Jun 11 11:01:27 1996 --- Src/exec.c Tue Jun 11 11:01:27 1996 *************** *** 1191,1196 **** --- 1191,1220 ---- } return; } + } else { + /* If AUTORESUME is set, the command is SIMPLE, and * + * doesn't have any redirections, then check if it * + * matches as a prefix of a job currently in the job * + * table. If it does, then we treat it as a command to * + * resume this job. */ + if (isset(AUTORESUME) && (how & Z_SYNC) && empty(cmd->redir) && + !input && !nextnode(firstnode(args)) && !cmd->flags) { + if (unset(NOTIFY)) + scanjobs(); + if (findjobnam(peekfirst(args)) != -1) { + pushnode(args, dupstring("fg")); + checked = 0; + } + } + /* If the command begins with `%', then assume it is a * + * reference to a job in the job table. */ + if (*(char *)peekfirst(args) == '%') { + pushnode(args, dupstring((how & Z_DISOWN) + ? "disown" : (how & Z_ASYNC) + ? "bg" : "fg")); + how = Z_SYNC; + checked = 0; + } } if (errflag || checked || (cflags & BINF_COMMAND)) *************** *** 1214,1240 **** hn = NULL; } } - - /* If the command begins with `%', then assume it is a * - * reference to a job in the job table. */ - if (nonempty(args) && *(char *)peekfirst(args) == '%') { - pushnode(args, dupstring((how & Z_DISOWN) - ? "disown" : (how & Z_ASYNC) ? "bg" : "fg")); - how = Z_SYNC; - } - - /* If AUTORESUME is set, the command is SIMPLE, and doesn't have * - * any redirections, then check if it matches as a prefix of a * - * job currently in the job table. If it does, then we treat it * - * as a command to resume this job. */ - if (isset(AUTORESUME) && type == SIMPLE && (how & Z_SYNC) && - nonempty(args) && empty(cmd->redir) && !input && - !nextnode(firstnode(args)) && !cmd->flags) { - if (unset(NOTIFY)) - scanjobs(); - if (findjobnam(peekfirst(args)) != -1) - pushnode(args, dupstring("fg")); - } /* Get the text associated with this command. */ if (jobbing || (how & Z_TIMED)) --- 1238,1243 ---- -- Peter Stephenson Tel: +49 33762 77366 WWW: http://www.ifh.de/~pws/ Fax: +49 33762 77330 Deutches Electronen-Synchrotron --- Institut fuer Hochenergiephysik Zeuthen DESY-IfH, 15735 Zeuthen, Germany.