[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

"set -" documentation

From: Paul Eggert
Subject: "set -" documentation
Date: Fri, 29 Apr 2005 15:11:12 -0700
User-agent: Gnus/5.1006 (Gnus v5.10.6) Emacs/21.4 (gnu/linux)

I installed this in response to a glitch with "set -" in coreutils:

2005-04-29  Paul Eggert  <address@hidden>

        * doc/autoconf.texi (Limitations of Builtins): Describe "set -"

--- autoconf.texi       29 Apr 2005 19:22:57 -0000      1.890
+++ autoconf.texi       29 Apr 2005 22:10:30 -0000      1.892
@@ -11180,9 +11180,14 @@ processing as soon as a non-option argum
 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 no
+longer requires support for this command, and in traditional shells
address@hidden - $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:
 set -ex

reply via email to

[Prev in Thread] Current Thread [Next in Thread]