From 0a9f0aa78c86495ddb5e9db3112638965f77a05d Mon Sep 17 00:00:00 2001 From: jilles Date: Fri, 18 Apr 2014 12:51:30 +0000 Subject: [PATCH] MFC r260246: sh(1): Discourage use of -e. Also, do not say that ! before a pipeline is an operator, because it is syntactically a keyword. git-svn-id: svn://svn.freebsd.org/base/stable/9@264645 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f --- bin/sh/sh.1 | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/bin/sh/sh.1 b/bin/sh/sh.1 index 7da0439c6..b934aebec 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 June 14, 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 -- 2.45.0