From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4402 invoked by alias); 23 Oct 2016 12:00:55 -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: X-Seq: 39712 Received: (qmail 3826 invoked from network); 23 Oct 2016 12:00:55 -0000 X-Qmail-Scanner-Diagnostics: from kahlil.inlv.org by f.primenet.com.au (envelope-from , uid 7791) with qmail-scanner-2.11 (clamdscan: 0.99.2/21882. spamassassin: 3.4.1. Clear:RC:0(37.59.109.123):SA:0(-0.3/5.0):. Processed in 0.4682 secs); 23 Oct 2016 12:00:55 -0000 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-0.3 required=5.0 tests=RP_MATCHES_RCVD autolearn=unavailable autolearn_force=no version=3.4.1 X-Envelope-From: martijn@inlv.org X-Qmail-Scanner-Mime-Attachments: | X-Qmail-Scanner-Zip-Files: | Received-SPF: none (ns1.primenet.com.au: domain at inlv.org does not designate permitted sender hosts) Subject: Re: 'export -p' lacks POSIX output To: Zsh hackers list References: <161022112423.ZM6178@torch.brasslantern.com> From: Martijn Dekker Message-ID: <2047d07f-c5c1-6b8f-3d2d-cfcc2c06b875@inlv.org> Date: Sun, 23 Oct 2016 14:00:42 +0200 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:45.0) Gecko/20100101 Thunderbird/45.4.0 MIME-Version: 1.0 In-Reply-To: <161022112423.ZM6178@torch.brasslantern.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Op 22-10-16 om 20:24 schreef Bart Schaefer: > Would anyone object if this just happened all the time, rather than > depending on POSIXBUILTINS + "export"? After the patch, variables with a non-scalar type get output such as: export -i10 SHLVL=2 Option flags to 'export' other than -p are not POSIX, and POSIX specifies output without any flags for 'export -p'. Maybe that implies that commands like 'export -p' and 'trap' should generate commands suitable for any POSIX shell. This would mean the $'...' quoting method should also be deactivated. It may become POSIX at some point, but it's anyone's guess how long that will take, and then shells have to implement it. Then again, POSIX says the input should be "suitable for reinput to the shell", not "suitable for reinput to any POSIX shell".[*] In any case, if the output needs to be conditional upon POSIXBUILTINS anyway, I reckon you might as well not change the behaviour at all if POSIXBUILTINS is not active. - M. [*] http://pubs.opengroup.org/onlinepubs/9699919799/utilities/V3_chap02.html#tag_18_22_04