From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27247 invoked by alias); 2 Nov 2017 20:11:42 -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: 41979 Received: (qmail 21001 invoked by uid 1010); 2 Nov 2017 20:11:42 -0000 X-Qmail-Scanner-Diagnostics: from know-smtprelay-omc-2.server.virginmedia.net 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(80.0.253.66):SA:0(-4.7/5.0):. Processed in 5.882475 secs); 02 Nov 2017 20:11:42 -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=-4.7 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_PASS,T_DKIM_INVALID autolearn=ham autolearn_force=no version=3.4.1 X-Envelope-From: p.w.stephenson@ntlworld.com X-Qmail-Scanner-Mime-Attachments: | X-Qmail-Scanner-Zip-Files: | X-Originating-IP: [86.21.219.59] X-Authenticated-User: p.w.stephenson@ntlworld.com X-Spam: 0 X-Authority: v=2.1 cv=C4wUsl7+ c=1 sm=1 tr=0 a=utowdAHh8RITBM/6U1BPxA==:117 a=utowdAHh8RITBM/6U1BPxA==:17 a=L9H7d07YOLsA:10 a=9cW_t1CCXrUA:10 a=s5jvgZ67dGcA:10 a=kj9zAlcOel0A:10 a=x7bEGLp0ZPQA:10 a=P5Q6L1DsAAAA:8 a=uZvujYp8AAAA:8 a=iE7ApKBxRAhsShc4axQA:9 a=CjuIK1q_8ugA:10 a=DkUxev3uDU8A:10 a=jxi25fIUQso1YTL4nQQM:22 a=SLzB8X_8jTLwj6mN0q5r:22 Date: Thu, 2 Nov 2017 20:04:29 +0000 From: Peter Stephenson To: Martijn Dekker Cc: Zsh hackers list Subject: Re: [PATCH] POSIXBUILTINS: quieten 'unset -f nonexistentfunc' Message-ID: <20171102200429.05c32b88@ntlworld.com> In-Reply-To: <8a9d23b7-63b5-37e0-9125-8bd5fdfc97e1@inlv.org> References: <51c2b43e-a0d3-2e4d-15e8-b368c922beec@inlv.org> <8a9d23b7-63b5-37e0-9125-8bd5fdfc97e1@inlv.org> X-Mailer: Claws Mail 3.11.1 (GTK+ 2.24.28; x86_64-redhat-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ntlworld.com; s=meg.feb2017; t=1509653069; bh=Kbh1N+EsoaEc4tQo4T7wFOnXT+DbA1nv7br3y4XVPek=; h=Date:From:To:Cc:Subject:In-Reply-To:References; b=SoRanWS9G//82/jX/Cd4Nj+Lm+wl07G/7kQN3aVs3wwnVrwKvUVMx8foWXivvjztJ f6ywnm3uVvAqHX9UMtChQl67A/JBfkTOzQ81DIvI+BEiVOo9Btt2UVXjFpZK28Y6CK SEZB7ADionnIQ4YQ7bbFfLz60IkCOJWKKRqQDwMjMYtLr4DvF7uBq1nUs5IU5oZukP zxPMCRSm834oYs6pscsRkmUp6BsIp19lQqnAqL3go/nw0imrmb0i2r0CXi1KiDuZUU 9fF8g4oLYoC6RBcdEFFdUiNZb6XntvtowrhMKICYze6eFpcTuhx18fGFPPrMEp52f1 xJffneTo/sZVQ== On Thu, 2 Nov 2017 19:04:40 +0000 Martijn Dekker wrote: > Op 11-10-17 om 19:44 schreef Martijn Dekker: > > Doing 'unset -f' on an unset function outputs an error message and > > causes an unsuccessful exit status. All other shells quietly ignore it. > > POSIX specifies for 'unset' that "Unsetting a variable or function that > > was not previously set shall not be considered an error [...]". > > http://pubs.opengroup.org/onlinepubs/9699919799/utilities/V3_chap02.html#tag_18_29_03 > > > > If I have figured this out correctly, then the attached patch causes > > 'unset -f nonexistent_function' to be quiet and return status 0 if > > POSIXBUILTINS is active, without changing the behaviour of 'unfunction' > > and 'unhash -f'. > > Was this overlooked, or rejected? Just got missed; I've committed it. pws