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 9703 invoked from network); 13 Mar 2022 15:16:44 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 13 Mar 2022 15:16:44 -0000 ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20210803; t=1647184604; b=d0BhBePH1M59S3iHhxO2CvXmp6dr/jA3NJsaL4cOpa9iw5cnMZ1oYaB/9CNbJ/Sj6U3vk3KY6x ehqzx9vc1eNsHeLPjEIiA/FKdpn1z9TUMJImrxS0S5h0j3SibxqQ65ZFFUwppfD9KtxHaraic7 dDOZj0bG8EZsG/RT7yzu3PkqkrUY6Z00FQo/v0Rxe4p9FzYvbslwoQTtevClxCRh6eRYGMJLyd eHaflVjQWEk8qiE9ka1x4/p1fhVwnOfVFTUUwM0CVkcWAL5TztqS6Ayc9hCthF+zAU+gyWQ3kZ /iA9NjrvFHZpAo0LYtpSTviu6QxvtxB8fS4DX6jg+fFztw==; ARC-Authentication-Results: i=1; zsh.org; iprev=pass (mail-yb1-f180.google.com) smtp.remote-ip=209.85.219.180; 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=1647184604; bh=BLUo1prBt8AJx7Kv9oqoSgoFAwi6REQmnCD9lA8WwoM=; h=List-Archive:List-Owner:List-Post:List-Unsubscribe:List-Subscribe:List-Help: List-Id:Sender:Content-Type:To:Subject:Message-ID:Date:From:Reply-To: MIME-Version:DKIM-Signature:DKIM-Signature; b=d5rA5UOELhkw6dRynzKdyYenJmWgcWV2Rt+vMiSH1KDOU2ysfbJMrnVvHExUX+cJtWXo7IbJsn qTJpvTbXklOW9UiMeZtImW4+FfzqKrW6c9Xn3rUp1Oqc7AcbVKu6z6Zgu3eSXhFGR1qr8ElqJC VjjxMKLAnv0ibpDB5WFpyMT6Rlf6iydFeoTubL2OOaG7VOtfKeYU0Uxm5v2O0749zVLMPxphhb 3x+wamuOFA/wJTQtdD2gSearIir2C+l4WdnNzuWqlx5drig46nc4XgH0FmkuKQdW0zb9KiTlmU +w65dcTX3FyRX0AWcfQ0uZ/UyRk5rbYmQVeo1xJen7f7fg==; 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:Reply-To:MIME-Version: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=XdHtL80ZUkIe3j7T7W0rFx4V8VD/oEuJY4neC+4+fkg=; b=cUNVTCfldAl9RIUKBvj2OIqfaP nfqsljjbeDl2WMGUOwmp3N6sZcSFC4TJu85Q0TNe5ZIctZaCTRShKluBaqE2+x1kvIpVInHLrVB9P uqzBcuLEKKpepPoPPbAxFTFMtVuS7w0u9ZDy4PjKcA+ug0+i8U4pKsSlz5YglAMwxB8RZn3K6/3VN GKFOVe3e/pVr9ung25+ok95nNblxm8dIpvZegHVz7YKYhuDTYklD/OX4AxUM9ZUlwS7v11pnaqiKN OZa8RVVqgEtRywUXiqEl5JMf31E1h/h7LBoQwb6urWhSu4nQtgWJNLkwpYGYeXbBQUCJTOXZ2Vvqe oWgj7Xhg==; Received: from authenticated user by zero.zsh.org with local id 1nTPxb-0002Mj-4A; Sun, 13 Mar 2022 15:16:43 +0000 Authentication-Results: zsh.org; iprev=pass (mail-yb1-f180.google.com) smtp.remote-ip=209.85.219.180; dkim=pass header.d=gmail.com header.s=20210112 header.a=rsa-sha256; dmarc=pass header.from=gmail.com; arc=none Received: from mail-yb1-f180.google.com ([209.85.219.180]:43796) by zero.zsh.org with esmtps (TLS1.3:TLS_AES_128_GCM_SHA256:128) id 1nTPx0-00021d-Pi; Sun, 13 Mar 2022 15:16:07 +0000 Received: by mail-yb1-f180.google.com with SMTP id g26so26171766ybj.10 for ; Sun, 13 Mar 2022 08:16:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:reply-to:from:date:message-id:subject:to; bh=XdHtL80ZUkIe3j7T7W0rFx4V8VD/oEuJY4neC+4+fkg=; b=FNY9IoocLU18vF1UGhR0A8MGPlyiaw5zXiXqDcbkXlyP7Yl4Sn2ubZ88netFDsJnhz ZkCZ3hzLthkizhmy/1/4+zxIVghMPewWJpmZ5pqin/4as+sn6bTQY/b/ghHZ9RcUOd9C q5QqU7/a7JLv/oFPyFOTkyB+0AZTWJ4tPGBd05X10jW4BHy0Oj4vxa+90eiJlI8Sk6wR wu4aSYiuHkjYF9pZMairnALpX562N9yfcylvx8mil7t7wvXUvuPzTNLUh2MIugTX0dry YoGxVkuytTaC0hiJ1TpCsyiBAwR3bETb7EkI9q5RfILUigTpXZbY3TzGxDa6UZPhF+fC BNJQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:reply-to:from:date:message-id :subject:to; bh=XdHtL80ZUkIe3j7T7W0rFx4V8VD/oEuJY4neC+4+fkg=; b=TebzWdbAAzhDoa0U0DT4lmtDcIAA+fQ4fJWWiNdEv1w9vCub6WOmpUKuLV1/G4lFVk JmAEMeQ94cCQxyLWb9n5pLyT0582vZKjK9GGL22X1Ggr0FR6e5E6uM/0ysgns20rJr4x NESmyqvKgbrRzB31UgzSHpnAiyNE1gAJ0mzDPKeNdBg/gkSYbOhjDAfi7mF8N+v5JzJn KOq6DhskCjLWVLFM6pYJRBnKQjPVbNwek7T83ahGI1cUTKZVr5fT7X9dIu6kNwkEEhBK IkF+4tngT9GDUYIdSjrmoT0JpNZimEvv7e5YuoY1K6hfyev8UkQTovsAdkoBp73bc3l2 GF0Q== X-Gm-Message-State: AOAM533d04F/fiTYRskikAGxDV7mVsG+FRBsgLDqdyNR1zjz4etf5XeR Tlw7caGkvWeJTznYsDCg8P89YXpp+DbCYrEbB1owdi4ECQE= X-Google-Smtp-Source: ABdhPJwEq5cUZOKPFqBg2s2eFoRfFtorF1RRdGGz8I+vO6HMvgYzYrDpsPi8jif0Ioy7zoIkd24Hgz6IOm/JFiWkEKI= X-Received: by 2002:a05:6902:1388:b0:624:6892:5495 with SMTP id x8-20020a056902138800b0062468925495mr14747958ybu.379.1647184565107; Sun, 13 Mar 2022 08:16:05 -0700 (PDT) MIME-Version: 1.0 Reply-To: linuxtechguy@gmail.com From: Jim Date: Sun, 13 Mar 2022 10:14:33 -0500 Message-ID: Subject: Clarifying man page(s) To: devs Content-Type: multipart/alternative; boundary="000000000000e2001805da1b0a91" X-Seq: 49833 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: --000000000000e2001805da1b0a91 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable While working on a script I encountered an issue with setopt. Since I was setting and unsetting an option multiple times I placed both in a functions to mostly get rid of the extra typing. But as some may already guessed, that didn't work. So looked at man zshall. Nothing jumped out. Google here I come. Eventually found this where St=C3=A9phane Chazelas wrote: (note that zsh only implements local scope for variables and options, not for functions, aliases...) This eventually got me to "emulate -L zsh" which is what I had at the top of my script. That led to "local_options". Found what caused the issue. To the point/question: Should zshoptions man page have a clear statement at the very beginning that "options" can have a local "scope"? "Scope" is only mentioned later in in three options. This on my part is assuming "scope" is the correct word to use here. FWIW, the "emulate builtin" references the three options (local_optioon, local_patterns and local_traps) but only two backreference emulate, local_traps does not. Thanks for listening. Jim Murphy Working with Unix/Linux for 40 years, so man pages have a love/hate relationship for me. Never clear enough or enough GOOD examples in them. That said the zsh man pages are good, but not perfect or as clear as they could be in all cases. Thanks to all who have made them as good as they are. --000000000000e2001805da1b0a91 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
While working on a script I encountered an issue with= setopt.=C2=A0 Since I was setting and
unsetting an option multip= le times I placed both in a functions to mostly get rid of the
ex= tra typing. But as some may already guessed, that didn't work.

So looked at man zshall. Nothing jumped out. Google here I= come. Eventually found this
where St=C3=A9phane Chazelas wrote:<= /div>
(note that zsh only implements local scope for variables and opti= ons, not for functions, aliases...)

This eventuall= y got me to "emulate -L zsh" which is what I had at the top of my= script. That led
to "local_options". Found what caused= the issue.

To the point/question:=C2=A0 Should zs= hoptions man page have a clear statement at the very
beginning th= at "options" can have a local "scope"?=C2=A0 "Scop= e" is only mentioned later in in
three options. This on my p= art is assuming "scope" is the correct word to use here.

FWIW, the "emulate builtin" references the t= hree options (local_optioon, local_patterns and
local_traps) but = only two backreference emulate, local_traps does not.

<= div>Thanks for listening.

Jim Murphy
Working with Unix/Linux for 40 years, so man pages have a = love/hate relationship for me.
Never clear enough or enough GOOD = examples in them. That said the zsh man pages
are good, but not p= erfect or as clear as they could be in all cases. Thanks to all who have
made them as good as they are.
--000000000000e2001805da1b0a91--