From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-3.4 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FROM,HTML_MESSAGE,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED,T_SCC_BODY_TEXT_LINE,UNPARSEABLE_RELAY autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 2457 invoked from network); 24 Apr 2022 07:13:27 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 24 Apr 2022 07:13:27 -0000 ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20210803; t=1650784407; b=q+u/BrEVdJ4F+Jn4W5TIQQYB9oxDeD/05Tvmw3fxZKxlvAKGCD4iLOuXMfgtHFGUVPJ37r+/Ef pKlsz4zIZOkHrRnpVLNyDYC8aqud88ilSv9E2f7+VGRW98gKu1Fmx4na9hDrlztze4bip7/MwT pL8FGhLBAUm761VyD9cLpJjV8OAzCz271fPwldrWip/wsUfcx9gAwMDmK7M1OI+M2k1c7ubf5e iTyPKLykshue35oZAvETDHJ9Lzge5Rg6h6DvVts9fDS7GRoFcMtOIZ9TK0fXxGrYoP+o6HbEwq JOfd0CcFnM/FsxRaL/fyZGy/ipgteyvYN8rLMCZhgoQ4ZQ==; ARC-Authentication-Results: i=1; zsh.org; iprev=pass (mail-oi1-f171.google.com) smtp.remote-ip=209.85.167.171; dkim=pass header.d=gmail.com header.s=20210112 header.a=rsa-sha256; dmarc=pass header.from=gmail.com; arc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed; d=zsh.org; s=rsa-20210803; t=1650784407; bh=kaF34D2EaRRaJ4TxRcqrd0HWKqy2oRRVG/atHvSkIlU=; h=List-Archive:List-Owner:List-Post:List-Unsubscribe:List-Subscribe:List-Help: List-Id:Sender:Content-Type:To:Subject:Message-ID:Date:From:MIME-Version: DKIM-Signature:DKIM-Signature; b=ZxU5hNPjluasItiiFFY+B+FeJMg90TTdD2HKxa01c+15aG7IyQnlkSF73R54b/OZsBgZV+y+QP JfIH0SACmqRDoW658PBZu8LzqeL2J/BOGm+j0cYJRqNKAC2FLzvzCjLmQVHuw24wA09eo91fQb yyn/ZnRhQGVqyeCqt9qSQGyc3qKjL5hNsmnuu6eGNq7QTzn5dztZKx9Q0ZKui4uTecIZMEl8ea ZfLO5I2BXEsh5MO+qR1/ujovnHpqXxqF2zWNTZ63rdL2SOoHslQ3TsEquzTsTx6erF6x+EGQwE ZENMoW/CJ+NPVljLupidEnnV97gW+wSBX33xW7Pev3QNkQ==; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=zsh.org; s=rsa-20210803; h=List-Archive:List-Owner:List-Post:List-Unsubscribe: List-Subscribe:List-Help:List-Id:Sender:Content-Type:To:Subject:Message-ID: Date:From:MIME-Version:Reply-To:Cc:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References; bh=5kQ6f2jaEhqGR0fxKUX5sFUUDZLfLCElYAl1Ffoxyyg=; b=KkTBMaoSknG7ji/PqmBo0AWOBX b4Z+8F6+hcO5Ft05ETv7F35hAYk1hTxVN7eDWwwRwdRQS8UoUpMXuRpJ22oq47IoQQnCkCVeLBu0s AfV9vnOU4siJmwfsVT0+cYk5lAF6P7jwIu5NomKyJqxYb5TMJFh2toyZzFhwHYZNbSBGtJJx1AA1L 8nKLQeIb6zDDlooQ3AlkFF0aUs7KHGxZfVT9TqDjMzvITJfQ1Mo3iCIcwiik8/xWD6ku9TgQPWX5o UzZ67KpMO8o6vAW+DzhUkUkG3KgK0LY/ngGcOPHRBiOJyC5EjadI0zNDxEffYPiLkQPbenxBfueiv 8iRqbeig==; Received: from authenticated user by zero.zsh.org with local id 1niWQw-0004pU-25; Sun, 24 Apr 2022 07:13:26 +0000 Authentication-Results: zsh.org; iprev=pass (mail-oi1-f171.google.com) smtp.remote-ip=209.85.167.171; dkim=pass header.d=gmail.com header.s=20210112 header.a=rsa-sha256; dmarc=pass header.from=gmail.com; arc=none Received: from mail-oi1-f171.google.com ([209.85.167.171]:46763) by zero.zsh.org with esmtps (TLS1.3:TLS_AES_128_GCM_SHA256:128) id 1niWQc-0004VB-EM; Sun, 24 Apr 2022 07:13:07 +0000 Received: by mail-oi1-f171.google.com with SMTP id b188so13789698oia.13 for ; Sun, 24 Apr 2022 00:13:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:from:date:message-id:subject:to; bh=5kQ6f2jaEhqGR0fxKUX5sFUUDZLfLCElYAl1Ffoxyyg=; b=V+tkEPaeMh6BjvD5CbsixizW0FHnobAzlf5KaBjBCferg9od5bR8mLiemzoRCsnIZK tGSeo52fnNDKOAgiPL/nl56F1dg6rqCh1jxHiKiYfxlwzOBidfpFoHuN3U5OAnDyrVXX n+W3ZNIuZOjguzfXIRK4ySccidWlZh1p2itcwWK/cPhEEeBJAi0XJcWyXB+7zF9BN2T8 CB8PWAAurViYsSCf6j/7AUrBw3PuQ7rwX1ac1uSN7Ah599et4x9ezWnxdLObGToVNxdX s6VvZzkdCNDDgPo3OZYu/9YAATooDnkMjBabRxGqliIlSI8qW1jPdlFhJl/su2e3NsMr cmrA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=5kQ6f2jaEhqGR0fxKUX5sFUUDZLfLCElYAl1Ffoxyyg=; b=hJ+Sldq5Oh/dk+0d01CHw+V4XsU2sB8o2DOrjLUj5WgZ+m+muhO6dV7Bu6kf2oV3bO GN9VwMyxTk7Pw13IbaH2xkZkzQu7lnmlrPyLHnj7hO/z0ddriXqTcR6JAyEvTNnF71mF I4L6m4Gp3ZUxwUPNzyfYD0kcYxF7qeJq29QhGw4MeumjmBxzmgq778UXAcUJVWbSPf/B rtGSAHkbBNa3g3q9f4amAp3CLT/ZvMwJTrjjgNAXZ6piZiVjVLPLJA+/9Wd71MCoC6dH H7vMtR7C8rdgkCMWCt6B7OYDuEzkpcv2wBraI4vI0OVx+xtw+o4uc63kr3wJyEazXn6/ ybQA== X-Gm-Message-State: AOAM531PIufpmWYvesVa/2fJoWk7ZD04otMFV1WktHOazoTQHwUYUL/W /FJQTJUMycuO9UmTlJVavT3syoxUZiLmfPU3tggVCu79i8UKGQ== X-Google-Smtp-Source: ABdhPJzVUDT/l0YGYd4ogEG856GD8JLofAKbJYTNGPnMKQbSi5hoJ8ty7c4+mLo+TeYPPutfpFvb+LOka4satcz8NdY= X-Received: by 2002:a05:6808:218d:b0:322:be7f:e113 with SMTP id be13-20020a056808218d00b00322be7fe113mr9917454oib.246.1650784385089; Sun, 24 Apr 2022 00:13:05 -0700 (PDT) MIME-Version: 1.0 From: Emily Seville Date: Sun, 24 Apr 2022 17:12:54 +1000 Message-ID: Subject: Problems in `zshmisc` manual page To: zsh-workers@zsh.org Content-Type: multipart/alternative; boundary="000000000000dfc48105dd613086" X-Seq: 50087 Archived-At: X-Loop: zsh-workers@zsh.org Errors-To: zsh-workers-owner@zsh.org Precedence: list Precedence: bulk Sender: zsh-workers-request@zsh.org X-no-archive: yes List-Id: List-Help: List-Subscribe: List-Unsubscribe: List-Post: List-Owner: List-Archive: --000000000000dfc48105dd613086 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable There are several issues in complex commands descriptions. *if command* > > if list then list [ elif list then list ] ... [ else list ] fi > The if list is executed, and if it returns a zero exit > status, the then list is executed. Otherwise, the elif list is executed > and if its status is zero, the then list is executed. If > each elif list returns nonzero status, the else list is executed. There is no mention of a terminator after *list*. It's better to rewrite command description as: if list *term* then list *term* [ elif list *term *then list *term *] ... [ > else list *term *] fi The if list is executed, and if it returns a zero exit > status, the then list is executed. Otherwise, the elif list is executed > and if its status is zero, the then list is executed. If > each elif list returns nonzero status, the else list is executed. *for command* > for name ... [ in word ... ] term do list done > Expand the list of words, and set the parameter name to eac= h > of them in turn, executing list each time. If the `in word' is > omitted, use the positional parameters instead of the words= . > The term consists of one or more newline or ; which > terminate the words, and are optional when the `in word' is omitted. > More than one parameter name can appear before the list of > words. If N names are given, then on each execution of the loop the > next N words are assigned to the corresponding parameters. > If there are more names than remaining words, the remaining parame=E2=80= =90 > ters are each set to the empty string. Execution of the > loop ends when there is no remaining word to assign to the first name. > It is only possible for in to appear as the first name in > the list, else it will be treated as marking the end of the list. It's better to write at my glance: > for name ... [ in word ... ] term do list *term* done > Expand the list of words, and set the parameter name to eac= h > of them in turn, executing list each time. If the `in word' is > omitted, use the positional parameters instead of the words= . > The term consists of one or more newline or ; which > terminate the words, and are optional when the `in word' is omitted. > More than one parameter name can appear before the list of > words. If N names are given, then on each execution of the loop the > next N words are assigned to the corresponding parameters. > If there are more names than remaining words, the remaining parame=E2=80= =90 > ters are each set to the empty string. Execution of the > loop ends when there is no remaining word to assign to the first name. > It is only possible for in to appear as the first name in > the list, else it will be treated as marking the end of the list. The same issues applies for: - for (second form) - while - until - repeat --=20 *# Best regards, Emily Grace Seville.* *[contacts]* site *=3D* "*https://emilyseville7cfg.github.io/about/ "* phone *=3D* "+79247259451*"* --000000000000dfc48105dd613086 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
There are several issues in complex commands descriptions.=

if command
if list then list [ elif list then list ] = ... [ else list ] fi
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 Th= e =C2=A0if list is executed, and if it returns a zero exit status, the then= list is executed.=C2=A0 Otherwise, the elif list is executed
=C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 and if its status is zero, the then = list is executed.=C2=A0 If each elif list returns nonzero status, the else = list is executed.

There is no mention = of a terminator after list. It's better to rewrite command descr= iption as:

if list term then list term [ elif list=C2=A0= term=C2=A0then list=C2=A0term=C2=A0] ... [ else list=C2=A0ter= m=C2=A0] fi
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 The =C2=A0if list is ex= ecuted, and if it returns a zero exit status, the then list is executed.=C2= =A0 Otherwise, the elif list is executed
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 and if its status is zero, the then list is executed.=C2= =A0 If each elif list returns nonzero status, the else list is executed.

for command
=C2=A0 =C2=A0 = =C2=A0 =C2=A0for name ... [ in word ... ] term do list done
=C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 Expand the list of words, and set th= e parameter name to each of them in turn, executing list each time.=C2=A0 I= f =C2=A0the =C2=A0`in =C2=A0word' =C2=A0is
=C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 omitted, use the positional parameters instead of = the words.
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 The term con= sists of one or more newline or ; which terminate the words, and are option= al when the `in word' is omitted.
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0 More =C2=A0than one parameter name can appear before the lis= t of words.=C2=A0 If N names are given, then on each execution of the loop = the
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 next N words are as= signed to the corresponding parameters.=C2=A0 If there are more names than = remaining words, the remaining =C2=A0parame=E2=80=90
=C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 ters =C2=A0are each set to the empty string= .=C2=A0 Execution of the loop ends when there is no remaining word to assig= n to the first name.
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 It= is only possible for in to appear as the first name in the list, else it w= ill be treated as marking the end of the list.
It's be= tter to write at my glance:
=C2=A0 =C2=A0 =C2=A0 =C2=A0for name ... [ in word ... ] term do lis= t term done
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 Expa= nd the list of words, and set the parameter name to each of them in turn, e= xecuting list each time.=C2=A0 If =C2=A0the =C2=A0`in =C2=A0word' =C2= =A0is
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 omitted, use the = positional parameters instead of the words.
=C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 The term consists of one or more newline or ; which te= rminate the words, and are optional when the `in word' is omitted.
= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 More =C2=A0than one parame= ter name can appear before the list of words.=C2=A0 If N names are given, t= hen on each execution of the loop the
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0 next N words are assigned to the corresponding parameters.= =C2=A0 If there are more names than remaining words, the remaining =C2=A0pa= rame=E2=80=90
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 ters =C2= =A0are each set to the empty string.=C2=A0 Execution of the loop ends when = there is no remaining word to assign to the first name.
=C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 It is only possible for in to appear as = the first name in the list, else it will be treated as marking the end of t= he list.
The same issues applies for:
  • fo= r (second form)
  • while
  • until
  • repeat
-= -
#=C2=A0Best= regards, Emily Grace Seville.
=
[contacts]
phone=C2=A0=3D=C2=A0"+79247259451"
<= /div> --000000000000dfc48105dd613086--