From: Eric Blake Date: Mon, 4 May 2009 16:30:16 +0000 (-0600) Subject: Document zsh bug with empty commands. X-Git-Tag: v2.64~59 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=780a068d297868cf3dd617ef12676cbfc3a05862;p=thirdparty%2Fautoconf.git Document zsh bug with empty commands. * doc/autoconf.texi (Special Shell Variables) : Add mention of more problems with $?. --- diff --git a/ChangeLog b/ChangeLog index e6e889256..88f417113 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2009-05-13 Eric Blake + + Document zsh bug with empty commands. + * doc/autoconf.texi (Special Shell Variables) : Add mention of + more problems with $?. + 2009-05-11 Patrick Welche (tiny change) Also try X11R7 when looking for X11 files, for NetBSD. diff --git a/doc/autoconf.texi b/doc/autoconf.texi index a4bb429e5..928b41789 100644 --- a/doc/autoconf.texi +++ b/doc/autoconf.texi @@ -14925,6 +14925,20 @@ underscores. @c Alphabetical order, case insensitive, `A' before `a'. @table @code +@item ? +Not all shells correctly reset @samp{$?} after conditionals (@pxref{if, +, Limitations of Shell Builtins}). Not all shells manage @samp{$?} +correctly in shell functions (@pxref{Shell Functions}) or in traps +(@pxref{trap, , Limitations of Shell Builtins}). Not all shells reset +@samp{$?} to zero after an empty command. + +@example +$ @kbd{bash -c 'false; $empty; echo $?'} +0 +$ @kbd{zsh -c 'false; $empty; echo $?'} +1 +@end example + @item _ Many shells reserve @samp{$_} for various purposes, e.g., the name of the last command executed. @@ -15850,6 +15864,7 @@ word splitting on @samp{$@{1+"$@@"@}}; see @ref{Shell Substitutions}, item @samp{$@@}, for more. +@anchor{if} @item @command{if} @c --------------- @prindex @command{if}