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,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 27892 invoked from network); 27 Jun 2022 21:58:32 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 27 Jun 2022 21:58:32 -0000 ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20210803; t=1656367112; b=AEwUD4VHQqsmRSpsI0EA6JMN3EmRku40IWlng7YOE1KMDPIYOFzfP9jEt2AnDnsmGdz3AwjWmV 08rXQAsJKg+95UujY9i3QwQgku/5RI8pmb5QIFmc3V8+/epbTRjIK/1UCzhbrynGszDl6gfH/8 4wPHU+bn6WJSaxawchXBlH2au1aP9ZrNgWb81fjEP7/Hovd4rE6euWg7RK+C4ecV5olJv1HuMK xLhFNVxWIguiyKKg7wEn9b850eTsiscY952nkYygoxdIfxxe5E8Q9DDwSMgqss+vPLrRsiaAdA R3XI/Mm4jSfB8ZFr2BnaFuNTobZd8lWeXKpMNST09PP5AA==; ARC-Authentication-Results: i=1; zsh.org; iprev=pass (mail-qv1-f43.google.com) smtp.remote-ip=209.85.219.43; 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=1656367112; bh=teDtakOFI+9RKQVLixIOF3DL+ltZ0NNf4bdHnfgX8qM=; h=List-Archive:List-Owner:List-Post:List-Unsubscribe:List-Subscribe:List-Help: List-Id:Sender:Content-Transfer-Encoding:Content-Type:Cc:To:Subject: Message-ID:Date:From:In-Reply-To:References:MIME-Version:DKIM-Signature: DKIM-Signature; b=iwIEP5UNwaw4zrgO5n86edBEjSffh3U+8WklY6MwfPKwjLbE8Ah6ZBEcEbjutulLayRZN5Vmqr M3BFFTq5pD0m9y29yr0+sYE902NL8kYwSQSdYAtnDDYQZVEiQEGkNUYbVXQNiRiJNRVwfCxEOb Ck4sqwgdTwnvTTpKzJDGLxz+bBGxpqwYdHBLi7jeWiT7CSS2lCxCeLMAdteB8XFaATRsRcFWsx N9KB3KGlekYuCtgnjiH+JnKI7RBG8DLMwJUsn/KX3P5AoLlbCE1TOa7zNaIPqa6huU0kw8HnPy Sy7FDvSdA3alYiYWYLah2OjC/d51CL2uTbGap6wAbR2Q7A==; 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:Cc:To:Subject:Message-ID:Date:From:In-Reply-To:References: MIME-Version:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID; bh=XOZ52etDXRg0JCSHD0Rvsa4jBL1GKOmSrf8vlvGEVUg=; b=YQgmBUVhQM9gBN5h1FMdAx24S5 5e8Nt/NUWW9n66esotpV0zPlES9cJqm+sufv83U0dVfTdmTWz7OqjY7nLZi1vhkh4/P8Ddj3dB29J AXzySedE2RbPXA8TERPyum/YqGtYiOP9sCsfbwk8pH8S2cpy0llmjVO7uz239lXyf0qvPcRdtuQB9 NBoUAKylaSjsBy5dNYFwHFZO8FED62f//BswwAlfE/6bPkscmddCGAL+YDYi2ow0DNg8U+ejY+lRI X1wd5DNrMgcAiurwVBB6BOwh8fyoeCZdYwuOtVtCuCctY4AHpp9nAeWx9FoW5u2gm5GAMC5GWb4Ql S4YwVS4w==; Received: from authenticated user by zero.zsh.org with local id 1o5wka-000BI3-4T; Mon, 27 Jun 2022 21:58:32 +0000 Authentication-Results: zsh.org; iprev=pass (mail-qv1-f43.google.com) smtp.remote-ip=209.85.219.43; dkim=pass header.d=gmail.com header.s=20210112 header.a=rsa-sha256; dmarc=pass header.from=gmail.com; arc=none Received: from mail-qv1-f43.google.com ([209.85.219.43]:35363) by zero.zsh.org with esmtps (TLS1.3:TLS_AES_128_GCM_SHA256:128) id 1o5wkM-000Ax9-Vo; Mon, 27 Jun 2022 21:58:19 +0000 Received: by mail-qv1-f43.google.com with SMTP id u14so14752354qvv.2; Mon, 27 Jun 2022 14:58:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=XOZ52etDXRg0JCSHD0Rvsa4jBL1GKOmSrf8vlvGEVUg=; b=CB30lGD2ODtufrbXIsmiG3HQ+f3po0e6D2pwHIzqub3ur1UbqSOw6RuM16BjfMNhqe ymwsZ5o9did4vlpeVxioAqpKOX80kRC9ShLRQgreE4EBX5uzPcbDq7ZDQAN2+FO7TBGt /LHYzoI3B5oghgJmZdAIomYUIhiIiv+51/crCjXYPzcfEk1u26GfRaslvkSm3u7Y6Ujv KWRVrMqzehJTWWNDkvYUiBV4ROrb3F2xs/UlOdYeexf/DJkRApL2Zn8BXniuPXK2Ael9 3CDVoplqnyJaCr5Q/ddvMZAQV6fSDP6B9mcPUwld0B8Gv4ncYzhG6Mb5kCkw2R68cTod WhNQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=XOZ52etDXRg0JCSHD0Rvsa4jBL1GKOmSrf8vlvGEVUg=; b=i/bSeRbn0t2OMpmvxRbPwKHdPOEZ9tTfejGiXw8MmeLPpsiQ1NCp0gNFjduhau/0Bq gYD2eS/7s3FkFYP2WNWccEoZb2bIBU7zuAyK9Jroa1HFy6EF/0koo8ns9UF5BJbKv0KX txqyIV3IIV2bJMGPtaIx0EFC03+SEz23tsCHyEwss8FoUyRzQ4N1BXWtQK+egobCXLI4 W2oDKNbbORmLHOI+qZMTSC5k7Do9KMF6ytqFDaJEsgg/D4FWjCtLzY0CZBHEqDCOTO4u OoMJIA35rHvXLVQu0PaztgnxbYXWJPY3kS/iLQ1stXQN+OUrLp/mGdt3vnRbCZzZRyAz V/2g== X-Gm-Message-State: AJIora/kypa7sorVGHlLsPcDJHsbET9P0o4aQxeVS6rEtR+00pslMWip RLM9qSE2CZILh1vDrnRFpOCWiA7jkar+f1RrEjKIPvIT49E= X-Google-Smtp-Source: AGRyM1uoDVzKDnzvqLMA1nusNZgU8up2FPtx8TtYvLbV5l45pT4lYdGnRpT1iQHFTxEelXakgyUefSkzRPzP8mL7V6U= X-Received: by 2002:ac8:7f49:0:b0:305:3392:6eb7 with SMTP id g9-20020ac87f49000000b0030533926eb7mr11176892qtk.84.1656367097705; Mon, 27 Jun 2022 14:58:17 -0700 (PDT) MIME-Version: 1.0 References: <3accd9cb-aede-41ce-96e6-f3e175392b9d@www.fastmail.com> <8d72c021-e5db-469d-b5ec-886248c26e46@www.fastmail.com> In-Reply-To: <8d72c021-e5db-469d-b5ec-886248c26e46@www.fastmail.com> From: Roman Perepelitsa Date: Mon, 27 Jun 2022 23:58:06 +0200 Message-ID: Subject: Re: Bug: 'export FOO' not idempotent To: =?UTF-8?Q?Lawrence_Vel=C3=A1zquez?= Cc: Michael Smith , Zsh hackers list Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Seq: 50392 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 Mon, Jun 27, 2022 at 11:52 PM Lawrence Vel=C3=A1zquez w= rote: > > On Mon, Jun 27, 2022, at 5:46 PM, Michael Smith wrote: > > Thanks for responding! I searched a bit but hadn't made that > > connection. > > Ah, yes -- the discussion was about "typeset", but it also affected > commands like "export" and "local" which in zsh are basically just > "typeset" in disguise. I remember. I was following that discussion. Here the issue is different. The problem is that `export FOO` doesn't export anything. Moreover, the subsequent `typeset -p FOO` says that FOO *is* exported. I think it should work as follows when TYPESET_TO_UNSET is not in effect (the default): % typeset -p FOO typeset: no such variable: FOO % export FOO % typeset -p FOO % export FOO=3D'' % env | grep FOO FOO Currently it works this the same way except for the last command, which outputs nothing. I think it should output "FOO" like in the hypothetical listing above. Roman.