Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: Really weird bug



schaefer@xxxxxxxxxxxxxxxxxxxxxxx wrote:
> Where the heck is the string "fg" coming from here?
> 
> zagzig<69> for p in %h
> > do echo "$p"
> > done
> fg
> %h

*** Src/exec.c.fg	Thu Jul 11 14:41:32 1996
--- Src/exec.c	Fri Jul 12 13:47:26 1996
***************
*** 1122,1128 ****
  
      /* 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;
--- 1122,1128 ----
  
      /* If the command begins with `%', then assume it is a *
       * reference to a job in the job table.                */
!     if (type == SIMPLE && nonempty(args) && *(char *)peekfirst(args) == '%') {
  	pushnode(args, dupstring((how & Z_DISOWN)
  				 ? "disown" : (how & Z_ASYNC) ? "bg" : "fg"));
  	how = Z_SYNC;

-- 
Peter Stephenson <pws@xxxxxx>       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.




Messages sorted by: Reverse Date, Date, Thread, Author