From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15625 invoked by alias); 2 Nov 2017 19:10:11 -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: 41976 Received: (qmail 22334 invoked by uid 1010); 2 Nov 2017 19:10:11 -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(-1.9/5.0):. Processed in 1.698899 secs); 02 Nov 2017 19:10:11 -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=-1.9 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD autolearn=ham autolearn_force=no version=3.4.1 X-Envelope-From: martijn@inlv.org X-Qmail-Scanner-Mime-Attachments: | X-Qmail-Scanner-Zip-Files: | Subject: Re: [PATCH] POSIXBUILTINS: quieten 'unset -f nonexistentfunc' From: Martijn Dekker To: Zsh hackers list References: <51c2b43e-a0d3-2e4d-15e8-b368c922beec@inlv.org> Message-ID: <8a9d23b7-63b5-37e0-9125-8bd5fdfc97e1@inlv.org> Date: Thu, 2 Nov 2017 19:04:40 +0000 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:52.0) Gecko/20100101 Thunderbird/52.4.0 MIME-Version: 1.0 In-Reply-To: <51c2b43e-a0d3-2e4d-15e8-b368c922beec@inlv.org> Content-Type: text/plain; charset=utf-8 Content-Language: en-GB Content-Transfer-Encoding: 7bit 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? Thanks, - M.