From: Eric Blake Date: Wed, 14 May 2008 19:41:18 +0000 (-0600) Subject: Improve documentation of ! issues. X-Git-Tag: v2.63~80 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=95dfc197494a66dc9a88577d18f1633afc7cff2d;p=thirdparty%2Fautoconf.git Improve documentation of ! issues. * doc/autoconf.texi (Limitations of Builtins) : Touch up. Reported by Noah Misch. Signed-off-by: Eric Blake --- diff --git a/ChangeLog b/ChangeLog index 3782a5b55..15adde0e7 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,9 @@ 2008-05-14 Eric Blake + Improve documentation of ! issues. + * doc/autoconf.texi (Limitations of Builtins) : Touch up. + Reported by Noah Misch. + Document some FreeBSD shell bugs. * doc/autoconf.texi (Limitations of Builtins) : Mention ! issue in compound pipe commands. diff --git a/doc/autoconf.texi b/doc/autoconf.texi index fd60b7bd5..ee1ede5c8 100644 --- a/doc/autoconf.texi +++ b/doc/autoconf.texi @@ -13776,13 +13776,19 @@ The Unix version 7 shell did not support negating the exit status of commands with @command{!}, and this feature is still absent from some shells (e.g., Solaris @command{/bin/sh}). Other shells, such as FreeBSD @command{/bin/sh} or @command{ash}, have -bugs when using @command{!} in compound commands: +bugs when using @command{!}: @example -$ @kbd{sh -c 'true && ! true | true; echo $?'} +$ @kbd{sh -c '! : | :'; echo $?} 1 -$ @kbd{ash -c 'true && ! true | true; echo $?'} +$ @kbd{ash -c '! : | :'; echo $?} 0 +$ @kbd{sh -c '! @{ :; @}'; echo $?} +1 +$ @kbd{ash -c '! @{ :; @}'; echo $?} +@{: not found +Syntax error: "@}" unexpected +2 @end example Shell code like this: