aboutsummaryrefslogtreecommitdiff
path: root/bin/sh/sh.1
diff options
context:
space:
mode:
authorJilles Tjoelker <jilles@FreeBSD.org>2014-01-03 22:56:23 +0000
committerJilles Tjoelker <jilles@FreeBSD.org>2014-01-03 22:56:23 +0000
commitb14cfdf665bb8b7b2898a4ee5b073ab87f8ea3d0 (patch)
treeece06fa6c5ce98b50ae14d2868d332c35b912bf5 /bin/sh/sh.1
parentfaacdbd9cf5784ab0aa9e859c9dcbb74c97c7ec6 (diff)
sh(1): Discourage use of -e.
Also, do not say that ! before a pipeline is an operator, because it is syntactically a keyword.
Notes
Notes: svn path=/head/; revision=260246
Diffstat (limited to 'bin/sh/sh.1')
-rw-r--r--bin/sh/sh.110
1 files changed, 8 insertions, 2 deletions
diff --git a/bin/sh/sh.1 b/bin/sh/sh.1
index 22e6ba6c552d..dc1716c0ab99 100644
--- a/bin/sh/sh.1
+++ b/bin/sh/sh.1
@@ -32,7 +32,7 @@
.\" from: @(#)sh.1 8.6 (Berkeley) 5/4/95
.\" $FreeBSD$
.\"
-.Dd November 1, 2013
+.Dd January 3, 2014
.Dt SH 1
.Os
.Sh NAME
@@ -235,10 +235,16 @@ or
.Dq Li ||
operator; or if the command is a pipeline preceded by the
.Ic !\&
-operator.
+keyword.
If a shell function is executed and its exit status is explicitly
tested, all commands of the function are considered to be tested as
well.
+.Pp
+It is recommended to check for failures explicitly
+instead of relying on
+.Fl e
+because it tends to behave in unexpected ways,
+particularly in larger scripts.
.It Fl f Li noglob
Disable pathname expansion.
.It Fl h Li trackall