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.4 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,UNPARSEABLE_RELAY autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 24658 invoked from network); 14 Apr 2021 11:40:48 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 14 Apr 2021 11:40:48 -0000 ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20200801; t=1618400448; b=EqcWjkLD6478tj+OhSoMzuFtvW+WKmLk8CEFxYnncvi2avhORQmMgiAJqJ1miu6OxdT1ifO0NO UNHcD8HvPr+BtTOFZgcY9ZjZ9zTh4dyEyr1RZtYj56v/yMz7s1M/k5SalR5YgpEXE3XmjR5oWC 73XWUqw/Ui8qmlcG5yJWvc+C4GDzLH1rI+K72NAA0TwbcQ+s7R8iwx1KFs2EaUSjw16CctDGy7 4mPYRy7tyTQpHOvJEFELcCQnXWtwcHvkOKQSN9+CKQIt79E1uGkyL+kI/r19IwhLW3YY4MdjMk P0in8SG3hveUHIBgN0xYvucs1BMcmpgChr+WL2AqDIDhUw==; ARC-Authentication-Results: i=1; zsh.org; iprev=pass (gmmr1.centrum.cz) smtp.remote-ip=46.255.225.252; dkim=pass header.d=volny.cz header.s=mail header.a=rsa-sha256; dmarc=pass header.from=volny.cz; arc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed; d=zsh.org; s=rsa-20200801; t=1618400448; bh=ZK+lMUGHMbo42jq07S/P1Jb84V9qCYSvgaLxJFJOCpI=; h=List-Archive:List-Owner:List-Post:List-Unsubscribe:List-Subscribe:List-Help: List-Id:Sender:Content-Transfer-Encoding:Content-Type:Message-ID: MIME-Version:In-Reply-To:References:Cc:From:Date:Subject:To:DKIM-Signature: DKIM-Signature; b=DuncjAnjCZ0Q+Nlbb+M0/7VYpxSyCpbuZG3AInibfMys/hJnHhbZqbAgDSX1EuEyh/qvjt5RrH 5DrzbfJdFWzcOBbwgQgmdpThrPsfUS1N8eZoDvGcJEHQ6pAgycpHM8I70gQWnpSFpalj4Hu9nk QZQ9vu8QoaVhHzm3A83pG5q0TA2EWSsp6eO5T0svLinQHWyEDKfwG5JeJrO/wHErTapRmEXSD1 AyqMgVqnQUCHQYz6pgnFdp8bH+MgSCOn3D9JiXTD5+Vsan7Ym4bkSzsBPaSUz5Omz9se6CdAiq atSSilOD2lM9TIzdqYHw/ccm+EF/oIfzGrKl0EMRq9yLYQ==; 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:Content-Transfer-Encoding: Content-Type:Message-Id:MIME-Version:In-Reply-To:References:Cc:From:Date: Subject:To:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID; bh=ptWuCOCBpkFG6NuQj2qlL743EU3kg0wGlcOuuXrKkC4=; b=zGoFknbZBDy7kuAmTk7Llw28Gd 4X6kHMzE65yQycCzX6hoLKYPBy9ziBtMuRwA8mEVlt7MNlFOx1oLT1PW2VZ/UOF+AAJ9RSB2XNaz+ HAgC+s9nc20sRpIhj9wxhPu2imj9YBxyMNMvQghb+Q6RNjbNgSfN9mxMtIS+mw3R0NXSRlwvCXxZU gxK5tDmmrooJhA4G0h0UxD2WboItpuOWKs8e7qXRN2ZzysbILeaRbNMzDqlYvpDToxXqi/yxqnTGb 54wQ0cfiGX4vnRXS7VeW1BO7z3fo1dzu95h1A09qlQKYzuTpPRuQH069RgTO52Z5NF69UKI9sqiGf s4jJG+5w==; Received: from authenticated user by zero.zsh.org with local id 1lWdt2-000OWI-8h; Wed, 14 Apr 2021 11:40:48 +0000 Authentication-Results: zsh.org; iprev=pass (gmmr1.centrum.cz) smtp.remote-ip=46.255.225.252; dkim=pass header.d=volny.cz header.s=mail header.a=rsa-sha256; dmarc=pass header.from=volny.cz; arc=none Received: from gmmr1.centrum.cz ([46.255.225.252]:38432) by zero.zsh.org with esmtps (TLS1:DHE-RSA-AES256-SHA:256) id 1lWdso-000OHm-OT; Wed, 14 Apr 2021 11:40:35 +0000 Received: from gmmr-1.centrum.cz (unknown [10.255.254.12]) by gmmr1.centrum.cz (Postfix) with ESMTP id 89F8A8033158; Wed, 14 Apr 2021 13:40:33 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=volny.cz; s=mail; t=1618400433; bh=ptWuCOCBpkFG6NuQj2qlL743EU3kg0wGlcOuuXrKkC4=; h=To:Subject:Date:From:Cc:References:In-Reply-To:From; b=ax4aTVeSn3w7N/YkTglSkJP7zs3D1cWe145Z+zpe/YMsL7GaXI+pkJ5ECX1szN9f3 38pNjNTvCrSoS6hJyekzwQ8iGu2NBR+bzGc1U/0AGiuPXmXhuSEms+d5oSqDXUv+ls 5VlLZeio+Pesa7L/fkC6VIFGmnBI3/GY3t+pvQQ0= Received: from vm1.excello.cz (vm1.excello.cz [5.180.49.60]) by gmmr-1.centrum.cz (Postfix) with QMQP id 8656D30008350; Wed, 14 Apr 2021 13:40:33 +0200 (CEST) Received: from vm1.excello.cz by vm1.excello.cz (VF-Scanner: Clear:RC:0(46.255.227.205):SC:0(-4.0/5.0):CC:0:; processed in 0.2 s); 14 Apr 2021 11:40:33 +0000 X-VF-Scanner-ID: 20210414114033.299493.2315.vm1.excello.cz.0 Received: from gmmr-4.centrum.cz (46.255.227.205) by out2.virusfree.cz with ESMTPS (TLSv1.3, TLS_AES_256_GCM_SHA384); 14 Apr 2021 13:40:33 +0200 Received: from mail1002.cent (unknown [10.255.254.38]) by gmmr-4.centrum.cz (Postfix) with ESMTP id 3732E20056054; Wed, 14 Apr 2021 13:40:33 +0200 (CEST) Received: by mail1002.cent (Postfix, from userid 33) id 2FBC52004CF11; Wed, 14 Apr 2021 13:40:33 +0200 (CEST) To: =?utf-8?q?Daniel_Shahaf?= Subject: =?utf-8?q?RE=3A_patch=3A_zshmisc=281=29_clarify_non=2Dsuccessful_exit_statuses?= Received: from 46.135.84.18 by mail1002.centrum.cz (centrum.cz multimail) with HTTP Date: Wed, 14 Apr 2021 13:40:33 +0200 From: Cc: References: <20210411141520.4ABA89D5@volny.cz>, <20210413155236.GR6819@tarpaulin.shahaf.local2>, <20210413200341.D91B3837@volny.cz> <20210414110355.GA31655@tarpaulin.shahaf.local2> In-Reply-To: <20210414110355.GA31655@tarpaulin.shahaf.local2> X-Mailer: Centrum Email 5.3 X-Priority: 3 X-Original-From: MIME-Version: 1.0 Message-Id: <20210414134033.1AB3540B@volny.cz> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Seq: 48563 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: Haai, "Daniel Shahaf" wrote: > zeurkous@volny.cz wrote on Tue, Apr 13, 2021 at 20:03:41 +0200: >> "Daniel Shahaf" wrote: >> > Thanks for the patch. Review: >> > >> > zeurkous@volny.cz wrote on Sun, Apr 11, 2021 at 14:15:20 +0200: >> >> #?patch >> >> # >> > >> > What's this header line? Is this a standard format for unidiffs with >> > log messages? Should Functions/VCS_Info/VCS_INFO_patch2subject grow >> > support for it? >> >> No, it's a "shehuh" (me own convention), to indicate the format (in this >> case: input to patch(1)). Ignore it if you wish. The rest of the '#' >> lines are just comments (meknows patch(1) will relay && discard any >> lines before the actual patch, but IMO it shouldn't, hence the prefix). >> >> patch(1) will eat all this fine (at least it does on me side). > > Every patch(1) implementation in the last few decades behaves this way. That's me experience, as well. However, me can't really guarantee that some clever-ass (like me :) didn't write a patch(1) w/ diff behaviour, hence the caveat. >> > zsh's source code is in git. git's interchange format is `[PATCH]' in >> > the subject line, then in the body, everything up to a "---" line is >> > part of the log message, and everything after is not. See >> > git-format-patch(1) for details. >> >> Thanks, but me doesn't use git (me has me own, very sufficient, ways to >> keep track of things). So me just used 'diff -u'. > > You can get svn working copies and tar.gz or zip exports from > https://github.com/zsh-users/zsh/. Me'll keep that in mind, should me have another contribution. >> >> # Hope this is useful (it is to me), >> >> # >> >> # --zeurkous, Sun Apr 11 11:12:21 UTC 2021. >> >> # >> >> --- Doc/Zsh/..v/5.8/exec.yo Mon Dec 4 14:09:35 2017 >> >> +++ Doc/Zsh/exec.yo Sun Apr 11 10:42:15 2021 >> >> @@ -16,7 +16,10 @@ >> >> Otherwise, the shell searches each element of tt($path) for a >> >> directory containing an executable file by that name. If the >> >> search is unsuccessful, the shell prints an error message and returns >> >> -a nonzero exit status. >> >> +127. >> >> + >> >> +If execution fails because of insufficient permissions, or because t= he >> >> +file is a directory, the shell prints an error message and returns 1= 26. >> >> >> > >> > Does this sentence cover every possible case of returning 126? The >> > condition in the source is =C2=AB=3D=3D EACCES || =3D=3D ENOEXEC=C2=BB= . >> >> Me wishes me had a guarantee. It probably differs from system to system >> (me runs OpenBSD); this is me best shot (for now). > > Does that mean you won't be submitting a revised patch? No problem if > so; just want to make it explicit whether or not revising the patch is > a task that's up for grabs. It's me best shot at understanding the behaviour, sorry for not being clear meself here. Me's a bit busy but me might well come up w/ a revised patch in a little while -- me'll let you folks know.=20 >> > I don't like the newly-added paragraph break. Anyone who stops reading >> > at the end of that paragraph will think the return code is 127, period= . >> >> Why would someone stop reading there...? > > People skim. That's understandable, but also at their own risk, me'd argue. >> > Also, stating the return values before going on to say that if the fil= e >> > isn't a directory then it's exeuted anyway could be confusing, couldn'= t it? >> >> In all honesty: to me, the whole text is so unnecessarily unclear that >> me'd apply me usual solution of writing exit statuses in a table: >> >> If execution fails: one of the following values is returned. >> .Pp >> .Bl -tag -width 126 -compact >> .It Li 126 >> [...summarize the condition{,s} that cause{,s} it to return that...] >> .It Li 127 >> [...idem...] >> .El >> >> (That's in mdoc(7), not in man(7). Sorry.) >> >> However, if you folks would desire that: me has no idea how to write >> that in yodl, so mecan't provide a patch. > > In this case, a startsitem() would probably work well. There's plenty > of examples in our tree. Thanks for the reference, me'll probably have a look. >> > Should this part of the manual mention the AUTO_CD option? >> >> Dunno. It could unnecessarily complicate it. >> > > "Unnecessarily"? Doesn't AUTO_CD logically belong in that part of the man= ual? Me doesn't use AUTO_CD, but if me understands the functionality correctly: it allows a dir path name to be specified as a program name, with the effect of a cd into the specified directory. To me, that's a translation: '/blaat/' -> 'cd /blaat/'. The return status of the former should then naturally be the return status of the latter. At least, that's me take on it. >> > A few paragraph below the value, 127, is mentioned again. Does that >> > sentence need to be updated? >> >> Me'd say that if the text above would be made sufficiently clear (with >> quotes of both diagnostic messages), that paragraph could be >> significantly curtailed, instead of extended. > > That's what I meant. Then we agree on that one :) > Daniel --zeurkous. =2D-=20 Friggin' Machines!