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=-1.0 required=5.0 tests=MAILING_LIST_MULTI, RCVD_IN_DNSWL_NONE autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 21512 invoked from network); 4 Jun 2020 02:37:35 -0000 Received: from ns1.primenet.com.au (HELO primenet.com.au) (203.24.36.2) by inbox.vuxu.org with ESMTPUTF8; 4 Jun 2020 02:37:35 -0000 Received: (qmail 14107 invoked by alias); 4 Jun 2020 02:37:29 -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: 45958 Received: (qmail 17785 invoked by uid 1010); 4 Jun 2020 02:37:29 -0000 X-Qmail-Scanner-Diagnostics: from out1-smtp.messagingengine.com by f.primenet.com.au (envelope-from , uid 7791) with qmail-scanner-2.11 (clamdscan: 0.102.3/25828. spamassassin: 3.4.4. Clear:RC:0(66.111.4.25):SA:0(-2.6/5.0):. Processed in 0.724148 secs); 04 Jun 2020 02:37:29 -0000 X-Envelope-From: d.s@daniel.shahaf.name X-Qmail-Scanner-Mime-Attachments: | X-Qmail-Scanner-Zip-Files: | Received-SPF: none (ns1.primenet.com.au: domain at daniel.shahaf.name does not designate permitted sender hosts) X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduhedrudegtddgheehucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepfffhvffukfgjfhfogggtgfesthhqtddtredtjeenucfhrhhomhepffgrnhhi vghlucfuhhgrhhgrfhcuoegurdhssegurghnihgvlhdrshhhrghhrghfrdhnrghmvgeqne cuggftrfgrthhtvghrnhephfdtteefheevuedthedutdeifeegteettdejtdffheduieei jeelteetkeduteehnecukfhppeejledrudejiedrfeelrdeileenucevlhhushhtvghruf hiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpegurdhssegurghnihgvlhdrshhh rghhrghfrdhnrghmvg X-ME-Proxy: Date: Thu, 4 Jun 2020 02:36:50 +0000 From: Daniel Shahaf To: Vin Shelton Cc: Peter Stephenson , Martin Tournoij , "zsh-workers@zsh.org" Subject: Re: Any way to allow clobbering empty files when noclobber is set? Message-ID: <20200604023650.6093bda4@tarpaulin.shahaf.local2> In-Reply-To: References: <89aed74d-db7b-47ad-b218-8158838049e9@www.fastmail.com> <94e73ebcf39d4d3f9c7ae257b1d75d16@CAMSVWEXC01.scsc.local> X-Mailer: Claws Mail 3.17.3 (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Vin Shelton wrote on Wed, 03 Jun 2020 22:13 -0400: > What is the significance of a 0-length file as opposed to a file with > contents? There _are_ some cases where a 0-length file is treated differently to a non-existing one: - .vimrc - =C2=ABcat foo=C2=BB (also #include's in C) - GNU make(1)'s lookup order: GNUmakefile / Makefile / makefile - /etc/nologin > If we want to support this feature, why don't we change the meaning of > NO_CLOBBER to mean only non-empty files? Because users might be relying on the semantics that the documentation promises. For example, a user who does =C2=ABecho foo > /etc/nologin=C2=BB and doesn'= t get an error may infer that it's fine to delete the file once they finish whatever change they're working on. Keeping the error would alert that user that they shouldn't remove the file when they're done (and, most likely, should pause to coordinate with whoever created /etc/nologin before them). Cheers, Daniel > - Vin >=20 > On Wed, Jun 3, 2020 at 8:05 AM Peter Stephenson > wrote: >=20 > > Martin Tournoij wrote: > > > I switched from tcsh to zsh a while ago (many years too late, I know), > > > and found zsh can do pretty much everything better. There's one thing > > > I rather miss though: the 'notempty' option in 'noclobber'. > > > > This isn't actually hard to implement. What does everyone else think? > > > > pws > >