From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23449 invoked by alias); 17 Nov 2015 10:37:58 -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: X-Seq: 37127 Received: (qmail 19472 invoked from network); 17 Nov 2015 10:37:56 -0000 X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,T_HDRS_LCASE, T_MANY_HDRS_LCASE autolearn=ham autolearn_force=no version=3.4.0 X-AuditID: cbfec7f5-f794b6d000001495-aa-564b0125d2f4 Date: Tue, 17 Nov 2015 10:27:45 +0000 From: Peter Stephenson To: Zsh Hackers' List Subject: PATCH: $signals Message-id: <20151117102745.06490c07@pwslap01u.europe.root.pri> Organization: Samsung Cambridge Solution Centre X-Mailer: Claws Mail 3.7.9 (GTK+ 2.22.0; i386-redhat-linux-gnu) MIME-version: 1.0 Content-type: text/plain; charset=US-ASCII Content-transfer-encoding: 7bit X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFlrJLMWRmVeSWpSXmKPExsVy+t/xa7qqjN5hBt+usVkcbH7I5MDoserg B6YAxigum5TUnMyy1CJ9uwSujE8rprEXfGKvOD6puoFxC1sXIyeHhICJxPGJE9ghbDGJC/fW g8WFBJYySux+mNrFyAVkz2CS+LZ7CSOEs41R4tHFS2AdLAKqEq1HLoJ1sAkYSkzdNBuoiIND REBbov2jGEhYWEBCovXLcVYQm1fAXuLSzoVgrfwC+hJX/35iglhsLzHzyhlGiBpBiR+T77GA 2MwCWhKbtzWxQtjyEpvXvGWGOE5d4sbd3ewTGAVmIWmZhaRlFpKWBYzMqxhFU0uTC4qT0nON 9IoTc4tL89L1kvNzNzFCAvDrDsalx6wOMQpwMCrx8O4+4hUmxJpYVlyZe4hRgoNZSYS3+BVQ iDclsbIqtSg/vqg0J7X4EKM0B4uSOO/MXe9DhATSE0tSs1NTC1KLYLJMHJxSDYzG+1eLVq/g K1850aNu9TK9HrNnS6SkJLoeZMbf+vTUoe7o181LBX4eTlt0ZqLCt1+lcj8bdHwVXm7ujnq9 QOvS5dpqO5fzR1awd1SeO7Q609rzSNu1t6lssz5MPv67J1FV+31DtMV1q2sm/BlL/3tufZXy 4p6Kafsh+083t0jLeRw48jjftGivEktxRqKhFnNRcSIAtjutWzwCAAA= Musing for the Nth time on how we managed to design the $signals array so that indices are off by one from signals, I noticed we don't even document the fact. pws diff --git a/Doc/Zsh/params.yo b/Doc/Zsh/params.yo index b896e2d..00ee41f 100644 --- a/Doc/Zsh/params.yo +++ b/Doc/Zsh/params.yo @@ -771,7 +771,13 @@ Incremented by one each time a new shell is started. ) vindex(signals) item(tt(signals))( -An array containing the names of the signals. +An array containing the names of the signals. Note that with +the standard zsh number of array indices, where the first element +has index 1, the signals are offset by 1 from the signal number +used by the operating system. For example, on typical Unix-like systems +tt(HUP) is signal number 1, but is referred to as tt($signals[2]). This +is because of tt(EXIT) at position 1 in the array, which is used +internally by zsh but is not known to the operating system. ) vindex(TRY_BLOCK_ERROR) item(tt(TRY_BLOCK_ERROR) )(