From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-1.0 required=5.0 tests=MAILING_LIST_MULTI, RCVD_IN_DNSWL_NONE autolearn=ham autolearn_force=no version=3.4.2 Received: from primenet.com.au (ns1.primenet.com.au [203.24.36.2]) by inbox.vuxu.org (OpenSMTPD) with ESMTP id a1998a04 for ; Sat, 21 Dec 2019 12:41:47 +0000 (UTC) Received: (qmail 26264 invoked by alias); 21 Dec 2019 12:41:42 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: List-Unsubscribe: X-Seq: 45110 Received: (qmail 1652 invoked by uid 1010); 21 Dec 2019 12:41:42 -0000 X-Qmail-Scanner-Diagnostics: from out4-smtp.messagingengine.com by f.primenet.com.au (envelope-from , uid 7791) with qmail-scanner-2.11 (clamdscan: 0.102.1/25663. spamassassin: 3.4.2. Clear:RC:0(66.111.4.28):SA:0(-1.9/5.0):. Processed in 0.412437 secs); 21 Dec 2019 12:41:42 -0000 X-Envelope-From: danielsh@apache.org X-Qmail-Scanner-Mime-Attachments: | X-Qmail-Scanner-Zip-Files: | Received-SPF: softfail (ns1.primenet.com.au: transitioning SPF record at amazonses.com does not designate 66.111.4.28 as permitted sender) X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedufedrvdduhedggedvucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucgogfeguddtqddvjeculdegtddmnecujfgurhephf fvufffkffojghfsedttdertdertddtnecuhfhrohhmpeffrghnihgvlhcuufhhrghhrghf uceouggrnhhivghlshhhsegrphgrtghhvgdrohhrgheqnecukfhppeejledrudektddrhe ejrdduudelnecurfgrrhgrmhepmhgrihhlfhhrohhmpegurghnihgvlhhshhesrghprggt hhgvrdhorhhgnecuvehluhhsthgvrhfuihiivgeptd X-ME-Proxy: From: Daniel Shahaf To: zsh-workers@zsh.org Subject: [PATCH 2/2] zshmisc(1): Fix markup of "try-list" and "always-list". Date: Sat, 21 Dec 2019 12:41:04 +0000 Message-Id: <20191221124104.22751-2-danielsh@apache.org> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20191221124104.22751-1-danielsh@apache.org> References: <20191221124104.22751-1-danielsh@apache.org> --- Doc/Zsh/grammar.yo | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/Doc/Zsh/grammar.yo b/Doc/Zsh/grammar.yo index a66358ed6..e028c8512 100644 --- a/Doc/Zsh/grammar.yo +++ b/Doc/Zsh/grammar.yo @@ -313,23 +313,23 @@ An `error' in this context is a condition such as a syntax error which causes the shell to abort execution of the current function, script, or list. Syntax errors encountered while the shell is parsing the code do not cause the var(always-list) to be executed. For example, -an erroneously constructed tt(if) block in tt(try-list) would cause the -shell to abort during parsing, so that tt(always-list) would not be +an erroneously constructed tt(if) block in var(try-list) would cause the +shell to abort during parsing, so that var(always-list) would not be executed, while an erroneous substitution such as tt(${*foo*}) would -cause a run-time error, after which tt(always-list) would be executed. +cause a run-time error, after which var(always-list) would be executed. An error condition can be tested and reset with the special integer -variable tt(TRY_BLOCK_ERROR). Outside an tt(always-list) the value is -irrelevant, but it is initialised to tt(-1). Inside tt(always-list), the -value is 1 if an error occurred in the tt(try-list), else 0. If -tt(TRY_BLOCK_ERROR) is set to 0 during the tt(always-list), the error -condition caused by the tt(try-list) is reset, and shell execution -continues normally after the end of tt(always-list). Altering the value -during the tt(try-list) is not useful (unless this forms part of an +variable tt(TRY_BLOCK_ERROR). Outside an var(always-list) the value is +irrelevant, but it is initialised to tt(-1). Inside var(always-list), the +value is 1 if an error occurred in the var(try-list), else 0. If +tt(TRY_BLOCK_ERROR) is set to 0 during the var(always-list), the error +condition caused by the var(try-list) is reset, and shell execution +continues normally after the end of var(always-list). Altering the value +during the var(try-list) is not useful (unless this forms part of an enclosing tt(always) block). -Regardless of tt(TRY_BLOCK_ERROR), after the end of tt(always-list) the -normal shell status tt($?) is the value returned from tt(try-list). +Regardless of tt(TRY_BLOCK_ERROR), after the end of var(always-list) the +normal shell status tt($?) is the value returned from var(try-list). This will be non-zero if there was an error, even if tt(TRY_BLOCK_ERROR) was set to zero.