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 10288 invoked from network); 3 May 2021 16:05:06 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 3 May 2021 16:05:06 -0000 ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20200801; t=1620057906; b=oEl+TTLcuQXWDUXgd1Sso1Y4oK3jUupJVZtGbJubAjeeS3kDFG17RS46cjL2DmNWcTtQjDRhiU kCC2y0pZ8mCWfc78uwKTwtqKBSsYvpWmqXt7NJxNEuFZdYoOWJYZeCqGaNLMfC5GIHagld9wsD BKMOQqzp09QnXmLOLVAAxfNajzr0KsFEL5f0gtpfIk8u1T7M7jNKzKdA+ZeCwDnOgJlbLdAP6N KAxs4bucS+ndzxbfrB8KaxUJtltVL/q4aLEhZViOQ5pm1an7yi6B/V9j0TCuV6V6owbG3jnSnT M15U3+boxKWTJLDd+wWga1yok5FHbsIo4srpJ1oftxx0JA==; ARC-Authentication-Results: i=1; zsh.org; iprev=pass (wout3-smtp.messagingengine.com) smtp.remote-ip=64.147.123.19; dkim=pass header.d=daniel.shahaf.name header.s=fm3 header.a=rsa-sha256; dkim=pass header.d=messagingengine.com header.s=fm2 header.a=rsa-sha256; dmarc=none header.from=daniel.shahaf.name; arc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed; d=zsh.org; s=rsa-20200801; t=1620057906; bh=2HZFu5GnNz3luOIAObBM6pCbrrEatd/+6+3uEw2cG3I=; h=List-Archive:List-Owner:List-Post:List-Unsubscribe:List-Subscribe:List-Help: List-Id:Sender:In-Reply-To:Content-Transfer-Encoding:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:DKIM-Signature: DKIM-Signature:DKIM-Signature; b=kxuX/82XxB4K3Ag1S9lkpPV//jVFjl0ErLgYk7Bu5PFDdQm1w8IbCA9WwxHurdenUaX/gnyVc4 NR0syVGx6YGWl5nF0jKMCFJXFj5qqXrKiXQ9M4MV9ikxEM/0qDRZvUsaRUtDnYG0Zv0iEqvkhL R9/6pHD0ktOH2hAmxm8fq3KazjkwIy7OyXhHJ5qMKr3S8th2dCAP+IBJJEEvW6coq4zsErHwuN RFVsmytQOz25vSOkeLjis5XUdUwRCF60UG5L9zxT2VlTQ+NdBLzyKUuvBkTfQGNTR6WdSSPFL4 N0VQO6IGTUgTBECQLP+fLUHCHFQnh2moTCpsfsycGzeQnw==; 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-Transfer-Encoding :Content-Type:MIME-Version:References:Message-ID:Subject:Cc:To:From:Date: Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender :Resent-To:Resent-Cc:Resent-Message-ID; bh=MUV0OETx81vdEWTQtaoRr3WoHz6EThVucSWg7Qt40a4=; b=D/j6Q3rnDSUg8WE7eHF30o6aAf a8ubS5EmBlcnp3/do+SB7k02FjkwhlAeZxuuqBYWnlILakbwxDmyuqdwa1f8lbxG4ITHIcxfY158U 9aYNEuWnf2Kit9LjSqJBV323VGNjiEI7E18l3EFwRbJfE6RVOBgJzNfYu9cKM893oFtSUTR7voI2X dNvWfX6D13a6LUrbnihJ3s6xnyZj+C/Pfx0do1jSiJvmSQcHek2CCzaw5JwTLfmfquy4SV45Bd1kB vCd+Zf6CTHQ2xGakDdooSHy/xi7RS3SqslhKm5JsjLoAHiAio9KiKZyPkv9RgqsTQ4c2+hRJMGytn SswXh6+A==; Received: from authenticated user by zero.zsh.org with local id 1ldb4B-000Haq-WD; Mon, 03 May 2021 16:05:04 +0000 Authentication-Results: zsh.org; iprev=pass (wout3-smtp.messagingengine.com) smtp.remote-ip=64.147.123.19; dkim=pass header.d=daniel.shahaf.name header.s=fm3 header.a=rsa-sha256; dkim=pass header.d=messagingengine.com header.s=fm2 header.a=rsa-sha256; dmarc=none header.from=daniel.shahaf.name; arc=none Received: from wout3-smtp.messagingengine.com ([64.147.123.19]:53411) by zero.zsh.org with esmtps (TLS1.3:TLS_AES_256_GCM_SHA384:256) id 1ldb3y-000HLX-Fc; Mon, 03 May 2021 16:04:51 +0000 Received: from compute2.internal (compute2.nyi.internal [10.202.2.42]) by mailout.west.internal (Postfix) with ESMTP id 9BD642546; Mon, 3 May 2021 12:04:48 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute2.internal (MEProxy); Mon, 03 May 2021 12:04:48 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= daniel.shahaf.name; h=date:from:to:cc:subject:message-id :references:mime-version:content-type:content-transfer-encoding :in-reply-to; s=fm3; bh=MUV0OETx81vdEWTQtaoRr3WoHz6EThVucSWg7Qt4 0a4=; b=DKzdwXUWxCeLPUpi2Now9As8UMjApdO7ezBq6ZD1RLNjfsOXRXG9PSAo ms7M1Bq1DTMC67h/z892kBgLub277RRdECQRCtLXhaPLGF74DGvUQQ/dGLjrruNp 3BCf2gufRvDhPZJYs/apBeRktjhoMyXcBmwTFBrZd9+2eIQzCVAGXENZBwtlQYJF Rco7XcV907HIgNFIMBVt1b57Hl/lbDI5ssUwRChVyyYGWMRO65Ub2w8fqV5bVOad AY710rmuIin8de+T5iHVeVtuxsQHn4922NE/cwgBySXvOGegYnNODV9+SIcxGkx7 xwPgpkg3Q/+dKUQfFFGnt5DacvMwLg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm2; bh=MUV0OETx81vdEWTQtaoRr3WoHz6EThVucSWg7Qt40 a4=; b=ZKKpAp43k5fy6u4soFJfqJrwwmSQwN63L1SUWhIE9ltPoVFJyuoYd77rD 41gm3/YdtXvwSZo4Wi64S77qsU4grKFRYHD0rfW0dsXXUqEdt+ce7ZKfFlcbXP0T BoMTEibYT06PMsd9Cme/B1b0xVF+Aa9xK2BVY8b8JPsEXEHc0xNlFnjMA3QGQwj8 +pwJ/AVQijfPaoqmz4D/8R6xZiejHLQSiY4JfvaS2z2dHHH/ievLbVyA+/sYZiHL Klvpt8mtmxEm1p1moU8DyhpCOWtj4gLIjbav21V1gbuwkTqT8hZpp63gNLiW9K2X Xx2m9d2o9QIRmm3WwEhugHFLzkG8w== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduledrvdefgedgleekucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepfffhvffukfhfgggtugfgjggfsehtkedttddtreejnecuhfhrohhmpeffrghn ihgvlhcuufhhrghhrghfuceougdrshesuggrnhhivghlrdhshhgrhhgrfhdrnhgrmhgvqe enucggtffrrghtthgvrhhnpefgkefgfeejgfdvvdfguddtleelkedvfeetiedtudfhveev veduhfdvveeffedvueenucfkphepuddtledrieeirdeifedrvdeftdenucevlhhushhtvg hrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpegurdhssegurghnihgvlhdr shhhrghhrghfrdhnrghmvg X-ME-Proxy: Received: from tarpaulin.shahaf.local2 (bzq-109-66-63-230.red.bezeqint.net [109.66.63.230]) by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 3 May 2021 12:04:47 -0400 (EDT) Received: by tarpaulin.shahaf.local2 (Postfix, from userid 1005) id 4FYnqK4Mttz2RX; Mon, 3 May 2021 16:04:45 +0000 (UTC) Date: Mon, 3 May 2021 16:04:45 +0000 From: Daniel Shahaf To: Marlon Richert Cc: Zsh hackers list Subject: Re: sysexits.h codes? (was: Re: [RFC][PATCH] `newuser` prompt theme) Message-ID: <20210503160445.GD16336@tarpaulin.shahaf.local2> References: <873D08A9-F321-474A-8440-CCE7DCCBA529@gmail.com> <20210414120551.GA3882@tarpaulin.shahaf.local2> <6CEA4F3E-9A64-44E1-9121-FA9D5E053AB5@gmail.com> <20210414140950.GH3882@tarpaulin.shahaf.local2> <0be2a280-9f0e-4762-87cb-aa6af32a813c@www.fastmail.com> <20210501144344.GA4080@tarpaulin.shahaf.local2> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) X-Seq: 48778 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: Marlon Richert wrote on Mon, May 03, 2021 at 14:36:01 +0300: > On Sat, May 1, 2021 at 5:43 PM Daniel Shahaf wrote: > > > > Marlon Richert wrote on Sat, May 01, 2021 at 16:39:06 +0300: > > > > Yeah. The code should say what it was trying to do when it called the > > > > syscall which returned that error; i.e., «zerrnam(foo, "while doing bar: > > > > %e", errno)» rather than «zerrnam(foo, "%e", errno)». > > > > > > That still wouldn't help the user understand why this happens (because > > > NOCLOBBER is set) > > > > NO_CLOBBER being set could be an action at a distance, so it'd be > > reasonable for stderr to mention it. Feel free to propose new text. > > Is there any precedent for warnings/errors that mention a shell option > being (un)set? If so, then we could use that as a template for this > one. None comes to mind, and grepping the output of `strings =zsh` doesn't turn up any, either. > Otherwise, maybe something like this? > > zsh: NO_CLOBBER: file exists; use >| to override > > It would give you the right keywords to use in a web search. +1 on putting the option name first. Not sure whether putting the strerror(3) string in the middle would work well in all cases. Convention — codified in errx(3) and friends, and compare Perl's «die "foo"» without a trailing newline — is that extra information is appended, rather than surrounded. The latter could also lead to ambiguous or unclear grammatical structures. Furthermore, the extra advice in the error wouldn't always be appropriate — for instance, when the error is EACCES ("Permission denied"). > > > As for your other points: Your call. I've laid out my arguments; I > > > have nothing further to add. > > > > What, are you asking me to make all design decisions myself? That's not > > how this list works. > > Sorry, I don't feel strongly enough about this to feel like debating it. :) Well, suit yourself, but unless someone else shows up to drive the discussion, it'll likely be left at that.