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

Bugfix to hzoli8



I discovered a small bug in my zsh distribution:

% zsh -f
turan% setopt ignorebraces 
turan% foo=bug
turan% echo ${bar-${foo}}
zsh: closing brace expected

Here is the fix.

Zoltan


*** 1.10	1995/05/05 17:20:22
--- Src/lex.c	1995/05/17 21:02:14
***************
*** 675,684 ****
  		}
  		c = Outpar;
  	    } else {
! 		if (e == '{' && !in_brace_param) {
  		    add(c);
  		    c = Inbrace;
! 		    in_brace_param = ++bct;
  		} else
  		    hungetc(e);
  	    }
--- 675,686 ----
  		}
  		c = Outpar;
  	    } else {
! 		if (e == '{') {
  		    add(c);
  		    c = Inbrace;
! 		    ++bct;
! 		    if (!in_brace_param)
! 			in_brace_param = bct;
  		} else
  		    hungetc(e);
  	    }



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