From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-3.2 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_EF,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.4 Received: from zero.zsh.org (zero.zsh.org [IPv6:2a02:898:31:0:48:4558:7a:7368]) by inbox.vuxu.org (Postfix) with ESMTP id 8E24923099 for ; Sat, 20 Jan 2024 23:28:03 +0100 (CET) ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20210803; t=1705789683; b=jHkceU0pvTIBKUSGjIMPhXMjgLP/m6LaciALamrGubNUZDTyb9vNsUFJt5yFb/wU94jCukW4JX ZkkQ+zBTr5xSIBfm5+38qAakMEAEFwDmV0R+Hdlxg3whHFM/sX3JWpBU1telCR/mleP/a3GI7d yeGl/9Xhe1IPijJRpguVF8TQoCy002iXIAIsD07se8DDBS4zjFmgf/wLC9Sbinqff4U7eJsJCa IavErLnUB9jY5+hPsfw2y7j4EUEWZwAcv7ZCns3rERFStjEl3v/CrghUEEytJUT8tjnT1R/GnY 55JVgtR6Ac/DPJGrUEH03zHAQQAnFnaydHnw/ypv8D0q2w==; ARC-Authentication-Results: i=1; zsh.org; iprev=pass (mail-ej1-f49.google.com) smtp.remote-ip=209.85.218.49; dkim=pass header.d=brasslantern-com.20230601.gappssmtp.com header.s=20230601 header.a=rsa-sha256; dmarc=none header.from=brasslantern.com; arc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed; d=zsh.org; s=rsa-20210803; t=1705789683; bh=ZtO8raC+P78PpycSaYaYthnzc5h7YNsTLU+XqiQK92g=; h=List-Archive:List-Owner:List-Post:List-Unsubscribe:List-Subscribe:List-Help: List-Id:Sender:Content-Transfer-Encoding:Content-Type:To:Subject:Message-ID: Date:From:In-Reply-To:References:MIME-Version:DKIM-Signature:DKIM-Signature; b=IM2X8ti/SQwmYHTDGXbT5j7HFSTthT5FPTFcdbqdY3p0ro1PHXXUQTmL1ULpKPPvK6BgqNWkG3 zlXmJSEEWOtBYtGnFHdZnnZRVInQgI0m9Oo/VT+vuerarmGnreJ6OKOzz9SB6/nf9xAYdpGTlg ilOIVQ+SHBFy9Ds6Thwe8dKWRRtJoaXk1xMjRcVW+mMv2BSYmteI/LPgBbCAiM9E52lkzi4G6h EbSgkBlvZ19gRsoSeWUjgOg2Dh5XZRNewbACku2QA7Nxv8nDYopyJqMMzmESy09xRIn/5ECqxF i6ncStbniXkxuZ6Afuyl8ppxB8gr9Mqom/16HNEaserq3Q==; 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-Transfer-Encoding: Content-Type:To:Subject:Message-ID:Date:From:In-Reply-To:References: MIME-Version:Reply-To:Cc:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID; bh=bSbP5s+8U6sj1RMX+BJFxF0m7c7eBvbTJtiO+cWVAzw=; b=sgmO5GuQg8OMu22ypYR/rehR0U YSYEhNI1AnHd2aD1/Z+q86opStgy3x71UrUAPmzNJ4cAjEKq1Om2dtUPBB2QIH6sOoBk7hvnZf8i9 W4Z1COas9uAM9CPM3kEOGYwcH7HDf0PzxmRYhKOHVaIWWakgIszM3okaA45mQDOSwHub/n/KaOyt6 4FiyL3TrZF46kvHqMEoSSuF0f+n+6Cs33JMn7yTcxfZm5cKtVip87jB0kYwK32JBhtuondbWwDizp Gn7LnAMz4BOO7RmRt2laI0LhXUwOwdzrFNkl0WU/bBELc9K7hc3yx5iqr5y3mEA0OR4xBHRHtGzV3 OBIL5sdw==; Received: by zero.zsh.org with local id 1rRJoo-000PJ4-Pm; Sat, 20 Jan 2024 22:28:02 +0000 Authentication-Results: zsh.org; iprev=pass (mail-ej1-f49.google.com) smtp.remote-ip=209.85.218.49; dkim=pass header.d=brasslantern-com.20230601.gappssmtp.com header.s=20230601 header.a=rsa-sha256; dmarc=none header.from=brasslantern.com; arc=none Received: from mail-ej1-f49.google.com ([209.85.218.49]:45300) by zero.zsh.org with esmtps (TLS1.3:TLS_AES_128_GCM_SHA256:128) id 1rRJoD-000OxQ-NZ; Sat, 20 Jan 2024 22:27:26 +0000 Received: by mail-ej1-f49.google.com with SMTP id a640c23a62f3a-a2f79e79f0cso174960066b.2 for ; Sat, 20 Jan 2024 14:27:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=brasslantern-com.20230601.gappssmtp.com; s=20230601; t=1705789645; x=1706394445; darn=zsh.org; h=content-transfer-encoding:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=bSbP5s+8U6sj1RMX+BJFxF0m7c7eBvbTJtiO+cWVAzw=; b=cm4DW2EPCIB3PJkPEnM3nks9RmptnrKfe+/GenYo1eMz35NxtOua9Q06Z5LA1yjQD9 6xBx1y7aAYeSJ6m9DN7Sy57dOnysUpgIxU+bMLWrcicn2y3F3hiCX9WGB5C89ER232c/ /1iDNAI65pyuHzruMCj7EWFgnih+mYmytdhj2wpPGq9TsuJK/eoDRcuIBmljyuKeKQG5 dqbEVVzMM+nikdsg510T9jQ7aHSKJrb+2fKdpEoB+w+ZsS6OYfQQ0OpqDetST1xK6LLC FCLjMcVN9JVobi2JqLh5NA9qw2WPJGR2XubTPZPepP88Igoe1Lm7AhKg2WCX4hO0ipnw GGpA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1705789645; x=1706394445; h=content-transfer-encoding:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=bSbP5s+8U6sj1RMX+BJFxF0m7c7eBvbTJtiO+cWVAzw=; b=Ed3WzKT1fut1QbKLJ615axFFTyaaq75PDRqVxfJQM4lGuu0hd2i3zU0+BI+2JP7rUF /Scv3fzzADZc+AaLQol5Mc/5ibJ/IP00vHWD+q7zyVe9UNryiMzdMf5JId5Fktw/m+8T 0Bg3DJKD4Z6x4IxHPnds3d2hOTFxMhLEK5ioSsb08WGJD7Fqr5Z+zf6yjayInnNqbLwA pLCBcgUpgCkLr0VOghFtYfOZymgABjlQcrdKMwzSItynJdv1wzMShwNzqvesddyIKral WPw8YNn2xwAIb5tqv3/uBigVUeW3H6vG2drS0ceJOXIvuPqIvnKpXw9YpkfEiurY+gGL k+Wg== X-Gm-Message-State: AOJu0Yyro6BaukvYB74beertGejFFADfRiksUZDa0Zmujxu+Cppd6uER ldGheevlRrKZzlQre58BaF6pkaHp2aaDq/bqOu5+1b9lxW0bhyfNRcps9fDVphOhNmST5ef4K6Q JZ64n2vxymwwYiZlItKwadSJKS175uj7RvNglPfEBmGBS2Fc= X-Google-Smtp-Source: AGHT+IGtkiIECnI/Au3pv5EB6dOtuVN+SUscGktoNjFoGCaBsUOgrqKcb7fsMDANV3rMGC4lEANhjb8RPr/HYI+MDBc= X-Received: by 2002:a17:907:a80a:b0:a2f:e41e:2217 with SMTP id vo10-20020a170907a80a00b00a2fe41e2217mr960936ejc.100.1705789644243; Sat, 20 Jan 2024 14:27:24 -0800 (PST) MIME-Version: 1.0 References: <1743596511.1328269.1703089342052@mail.virginmedia.com> <1226059227.1330686.1703091321163@mail.virginmedia.com> <483108200.1333094.1703093446204@mail.virginmedia.com> In-Reply-To: From: Bart Schaefer Date: Sat, 20 Jan 2024 14:27:13 -0800 Message-ID: Subject: Re: [BUG] multibyte never set according to setopt/unsetopt output To: zsh-workers@zsh.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Seq: 52495 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: On Fri, Jan 19, 2024 at 7:02=E2=80=AFAM Mark J. Reed = wrote: > > Basically, because `multibyte` is on by default, the *`setopt` commands b= ehave as if there were instead an option with the inverted meaning named `n= omultibyte`, and it is that string rather than `multibyte` which shows up History lesson time for the interested (and who haven't been here all along= ) ... Originally most of zsh's options (dozens have been added since) were based on BSD csh options. In csh, the defaults were always on, and if you wanted something to not happen, you had to assert a negative. Hence for example issuing a "no match" error on a failed glob is default behavior, and to disable that you assert "nonomatch". Consequently zsh had "setopt nonomatch" and a number of other options with a "no" prefix that meant to turn some behavior off. This led to a lot of double-negatives when trying to toggle an option via the "unsetopt" command. Zsh's first innovation to try to account for this was to start looking for that leading "no" and reversing the meaning for setopt/unsetopt based on its presence or absence -- but internally the options were still named, and therefore documented, in the original forms. Later (but before the code moved into CVS and thence git, so AFAIK it's not findable in the commit logs) there was an effort made to force as many options as possible to be coded and documented in the "positive" sense, to remove the double negatives internally and make it possible to do so in scripts -- but the operation of the setopt and unsetopt commands with respect to a leading "no" was kept unchanged for backward compatibility, and their respective output still follows that convention. Consequently most of the time when a function is asserting a particular option state, you'll see a single "setopt localoptions" followed by a mix of options with or without a "no" prefix, because that's more concise than writing setopt to turn things on and following that with unsetopt to turn other things off, even though the option names are now arranged so as to permit exactly that.