From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=0.3 required=5.0 tests=DKIM_ADSP_CUSTOM_MED, FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE,RDNS_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.2 Received: (qmail 24395 invoked from network); 21 Mar 2020 21:36:31 -0000 Received-SPF: pass (primenet.com.au: domain of zsh.org designates 203.24.36.2 as permitted sender) receiver=inbox.vuxu.org; client-ip=203.24.36.2 envelope-from= Received: from unknown (HELO primenet.com.au) (203.24.36.2) by inbox.vuxu.org with ESMTP; 21 Mar 2020 21:36:31 -0000 Received: (qmail 1840 invoked by alias); 21 Mar 2020 21:36:22 -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: List-Unsubscribe: X-Seq: 45598 Received: (qmail 27698 invoked by uid 1010); 21 Mar 2020 21:36:22 -0000 X-Qmail-Scanner-Diagnostics: from mail-io1-f48.google.com by f.primenet.com.au (envelope-from , uid 7791) with qmail-scanner-2.11 (clamdscan: 0.102.2/25751. spamassassin: 3.4.2. Clear:RC:0(209.85.166.48):SA:0(-2.0/5.0):. Processed in 1.156543 secs); 21 Mar 2020 21:36:22 -0000 X-Envelope-From: shane2squires@gmail.com X-Qmail-Scanner-Mime-Attachments: | X-Qmail-Scanner-Zip-Files: | Received-SPF: pass (ns1.primenet.com.au: SPF record at _netblocks.google.com designates 209.85.166.48 as permitted sender) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=B1J/rM+KFDUS+JxRfb2gsW8zPtH/HcDt3qqDidwN0Fs=; b=hDxZ4iqRmf7ZNh19ZFaRpD2u9PVeQT9aAnysYe+PXcMBbK4fczmhpoqCZTo1xUnLDw slG2FEs2Wu1ih6f37D2XCmT2tgxiJ0b8uOyhTzN6qNWlhRqbhx+NznJe8vsSFd1f1hsH hwlNZ8y6odC0mSNJDlPiKOnShO6QQ7je+UBRhr0B2WpGRamfTMp6Rjuonh3MFR8dlL2q piZJAJj7mSTSE+LEkBHoIhtYiJCOVm6UBtbnRUNd79ApR+uO8iVUbbwRDcUaS8S0EyFO UjCe8jqacTuIG1lstoyEDNdOPgt2znZdoe4jsg+9kBJJLEsrKdw3Mmwlb0fdPhglphFg QsSA== X-Gm-Message-State: ANhLgQ38HNKCGNXmxCwkRvxCTlWFbLA4cRg0FETryGOOGBLow5bQU5Ar xcxegk5yeozXldQ+CXWdRgt4W4lO1ZQVMtaQOVoMQcgP9cs= X-Google-Smtp-Source: ADFU+vuwcOOJRVPuzI2SiqPi8Wmx3tKZghc9QN4zgn8vxqrP5vhfEcf7l2qhSFzmo+QhEsMwdKCnk+Py2GOPj5l8smE= X-Received: by 2002:a02:58c3:: with SMTP id f186mr2484753jab.93.1584826546648; Sat, 21 Mar 2020 14:35:46 -0700 (PDT) MIME-Version: 1.0 From: Shane Squires Date: Sat, 21 Mar 2020 14:35:35 -0700 Message-ID: Subject: "export FOO" twice behaves differently than "export FOO" once To: zsh-workers@zsh.org Content-Type: multipart/alternative; boundary="00000000000057fbca05a1642f5d" --00000000000057fbca05a1642f5d Content-Type: text/plain; charset="UTF-8" Hi, zsh workers-- First of all, zsh is fantastic, so thanks for maintaining it. I wanted to report some unusual behavior with the export command. This is for the usage where a variable is exported without being given a value. Exporting a variable twice seems to add it to the environment, but exporting it once does not. See shell output below. % echo $ZSH_VERSION 5.3.1 % unset FOO % export FOO % /usr/bin/env | grep FOO % export FOO % /usr/bin/env | grep FOO FOO= Is this an expected behavior? I can see an argument for either behavior (either adding FOO to the environment or not adding it) when no value is given. But it seems like the behavior should be consistent whether exporting once or twice. Note that the same behavior is not true in bash, for example: bash-4.3$ echo $BASH_VERSION 4.3.0(1)-release bash-4.3$ unset FOO bash-4.3$ export FOO bash-4.3$ /usr/bin/env | grep FOO bash-4.3$ export FOO bash-4.3$ /usr/bin/env | grep FOO Let me know if you need any additional information. Thanks-- Shane --00000000000057fbca05a1642f5d--