From: Paul Eggert Date: Fri, 29 Apr 2005 22:05:14 +0000 (+0000) Subject: (Limitations of Builtins): Describe "set -" problems. X-Git-Tag: AUTOCONF-2.59c~404 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=312fdf37509d15ea831b4faf0644f0508fffa40d;p=thirdparty%2Fautoconf.git (Limitations of Builtins): Describe "set -" problems. --- diff --git a/doc/autoconf.texi b/doc/autoconf.texi index 89f8f6581..d0f531415 100644 --- a/doc/autoconf.texi +++ b/doc/autoconf.texi @@ -11180,9 +11180,14 @@ processing as soon as a non-option argument is found. Therefore, use set x $my_list; shift @end example -Some shells have the "opposite" problem of not recognizing all options +Avoid @samp{set -}, e.g., @samp{set - $my_list}. POSIX 1003.1-2001 no +longer requires support for this command, and in traditional shells +@samp{set - $my_list} resets the @samp{-v} and @samp{-x} options, which +makes scripts harder to debug. + +Some nonstandard shells do not recognize more than one option (e.g., @samp{set -e -x} assigns @samp{-x} to the command line). It is -better to elide these: +better to combine them: @example set -ex