]> git.ipfire.org Git - thirdparty/autoconf.git/commitdiff
Document zsh bug with empty commands.
authorEric Blake <ebb9@byu.net>
Mon, 4 May 2009 16:30:16 +0000 (10:30 -0600)
committerEric Blake <ebb9@byu.net>
Wed, 13 May 2009 12:25:26 +0000 (06:25 -0600)
* doc/autoconf.texi (Special Shell Variables) <?>: Add mention of
more problems with $?.

ChangeLog
doc/autoconf.texi

index e6e889256216f6a24b51b4a954024dc5189c09b7..88f41711356f5726c5adc7b0077f14325131df0e 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2009-05-13  Eric Blake  <ebb9@byu.net>
+
+       Document zsh bug with empty commands.
+       * doc/autoconf.texi (Special Shell Variables) <?>: Add mention of
+       more problems with $?.
+
 2009-05-11  Patrick Welche  <prlw1@cam.ac.uk>  (tiny change)
 
        Also try X11R7 when looking for X11 files, for NetBSD.
index a4bb429e586af2040b52d2de1afbc5528a243d22..928b41789f8895b5002f592abb0dc765f992a087 100644 (file)
@@ -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}