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.3 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,UNPARSEABLE_RELAY autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 24384 invoked from network); 30 Nov 2020 17:15:14 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 30 Nov 2020 17:15:14 -0000 ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20200801; t=1606756514; b=tK/8Y/DlVqMGXefVJHreJBe2FzsZu6RxGKVVuj3iwUdRBZK1nMeKYFVTqGrMLaX87rTGsTslKb i1XsXKa7TKc52S8JBC1UtF9RNwva4lbrvzRcyTLyjJqK3UJs26DnInzd6z6miQ93s6GhPrZnC1 PTAf+gDoNrXt3m7zrWpKrxmZsZDFu0Nx+etMjhaA41oLzMK2xUHNDo+3WVzfleth1X9ozzPBxX oFgFJTyGhbYStlcL2zP2MR0e75Rml3aS8Ra6Lrf0yYxSPd7oxDPvcYpnosBh6sXj4+UTXSTk6R ke8NO2ZoauEkh1cVk/mBq4FyiKi3GOe6DupzZx1Ocx7xfg==; ARC-Authentication-Results: i=1; zsh.org; iprev=pass (relay6-d.mail.gandi.net) smtp.remote-ip=217.70.183.198; dmarc=none header.from=chazelas.org; arc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed; d=zsh.org; s=rsa-20200801; t=1606756514; bh=PZhtmnXA5Axr4E4QyRLVwrAyllAOZNMnveu43AA+K5k=; h=List-Archive:List-Owner:List-Post:List-Unsubscribe:List-Subscribe:List-Help: List-Id:Sender:In-Reply-To:Content-Type:MIME-Version:References:Message-ID: Subject:Cc:To:From:Date:DKIM-Signature; b=nzf3S2gBrwx17wV+ysekwlOLoo1HrYS6REYa9/vCSB81cHqVjBGp4vTMAV5sXRab8JCH6AOH9X jAAgvzlPDCl0v6XVGCDsSrM47fUv2INREVWm4FZLQsUTFT4HAIxuLQplueWRcuDGkWwA6uojTB 7yHkPN3GY8a5gc01Gt0kWtU/ZpYnEyd/lW9rfrNoYvWqGkaYN68RjO9YElodBdo3q16xA1/bb6 aaW6LKcJc4YHsiT8RbEdhq5Qy6ATAro/bmr/mgRHkV8EiRQuAgrkWFTQOZHdo5Ut0bjgLwIjRv 0AJhMFy68R2EXSWLDqgO27PsixbDQLSSGRhtWbjNQNPu1A==; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=zsh.org; s=rsa-20200801; h=List-Archive:List-Owner:List-Post:List-Unsubscribe: List-Subscribe:List-Help:List-Id:Sender:In-Reply-To:Content-Type:MIME-Version :References:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID; bh=qoJbbj8z4awgz8GG1FBrJ8agwl474tWwFI/X9SsJyCM=; b=mwtlkLaxePR+V3UPK8ozVc4+Sj v5UFvLLS3/nh6LXEfSVJhWGP+ojQpVfZ3jABHOJrvM3wzKbruXJcD61XH0yn6aeFDKyuuhpg18y71 SMcLOVlexbHMSs3+bV+I52R0asdIr6F5wzWdn9yRiID/2/PTQ//A+Or6kt4M7JYjipmR2Bi3ly4mH jeMi4xUxr+Ojs22GbmzQFxHhzWKHVai4wU/fdRid6fzhiyYHZ62aejBaolASYdIajr8nkG40OszWK VguMwAmMHU416NRZfoabkPMTn7NUyh/trqW13Pkgft5u6Gx3S/f0F0f4X3Vz3ua9i5R0wQ7Kf6M+p bv3lHbkg==; Received: from authenticated user by zero.zsh.org with local id 1kjmlc-0007xv-AK; Mon, 30 Nov 2020 17:15:12 +0000 Authentication-Results: zsh.org; iprev=pass (relay6-d.mail.gandi.net) smtp.remote-ip=217.70.183.198; dmarc=none header.from=chazelas.org; arc=none Received: from relay6-d.mail.gandi.net ([217.70.183.198]:44775) by zero.zsh.org with esmtps (TLS1.2:ECDHE-RSA-AES256-GCM-SHA384:256) id 1kjmlP-0007nu-Aj; Mon, 30 Nov 2020 17:14:59 +0000 X-Originating-IP: 94.10.124.211 Received: from chazelas.org (unknown [94.10.124.211]) (Authenticated sender: stephane@chazelas.org) by relay6-d.mail.gandi.net (Postfix) with ESMTPSA id DBFCEC0003; Mon, 30 Nov 2020 17:14:57 +0000 (UTC) Date: Mon, 30 Nov 2020 17:14:57 +0000 From: Stephane Chazelas To: Bart Schaefer Cc: Zsh hackers list Subject: Re: More typeset bugs: POSIX_BUILTINS Message-ID: <20201130171457.yofem5soaiiaprxc@chazelas.org> Mail-Followup-To: Bart Schaefer , Zsh hackers list References: <20201129201246.z576arko6rlmr3pu@chazelas.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Seq: 47705 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: Archived-At: 2020-11-29 12:18:29 -0800, Bart Schaefer: > On Sun, Nov 29, 2020 at 12:12 PM Stephane Chazelas > wrote: > > > > FWIW, though I'd agree it's a bug, it's not a POSIX > > non-compliance as the behaviour for "readonly/export -p var" is > > unspecified by POSIX, POSIX only specifies "readonly/export -p" > > without arguments. > > Both bash and ksh ignore -p for readonly/export when there are any > non-option arguments, and therefore create/assign the named variables. > > So this is at least a ksh emulation incompatibility. Yes, I had assumed "-p" was for "print", but it looks like it's more for "POSIX" / "portable" (though neither bash nor zsh give portable output upon "export -p" when not in posix mode) With that in mind, it makes more sense now that export -p foo could be expected to do anything else than print the definition of foo. Still, I can't see why anyone would write that as the "-p" has no effect if the intention is to export foo. While yash and zsh agree on "export -p HOME" printing the definition of HOME, "export -p HOME=bar" sets HOME to bar in yash and ignores -p, while in zsh, it prints the current value of HOME and ignores =bar. -- Stephane