zsh-workers
 help / color / mirror / code / Atom feed
From: Vin Shelton <acs@alumni.princeton.edu>
To: Daniel Shahaf <d.s@daniel.shahaf.name>
Cc: Peter Stephenson <p.stephenson@samsung.com>,
	Martin Tournoij <martin@arp242.net>,
	 "zsh-workers@zsh.org" <zsh-workers@zsh.org>
Subject: Re: Any way to allow clobbering empty files when noclobber is set?
Date: Thu, 4 Jun 2020 07:57:18 -0400	[thread overview]
Message-ID: <CACeGjnV=4DZ0hzf9vi-H6A_AWePBiu5R-+jxm8nywFOF1nDgrQ@mail.gmail.com> (raw)
In-Reply-To: <20200604023650.6093bda4@tarpaulin.shahaf.local2>

[-- Attachment #1: Type: text/plain, Size: 1848 bytes --]

IMO, there is little to no reason to complexify the code and add to the
users' cognitive burden by adding a new option.  That written, NO_CLOBBER
is a feature I don't use, so I'll contentedly end my part of this
conversation now.

  - Vin


On Wed, Jun 3, 2020 at 10:36 PM Daniel Shahaf <d.s@daniel.shahaf.name>
wrote:

> 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
> - «cat foo» (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 «echo foo > /etc/nologin» 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
> >
> > On Wed, Jun 3, 2020 at 8:05 AM Peter Stephenson <
> p.stephenson@samsung.com>
> > wrote:
> >
> > > 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
> > >
>
>

  reply	other threads:[~2020-06-04 11:58 UTC|newest]

Thread overview: 43+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CGME20200603020919eucas1p13e26ebcbb335784d14bfb97b137f385a@eucas1p1.samsung.com>
2020-06-03  2:08 ` Martin Tournoij
2020-06-03 12:04   ` Peter Stephenson
2020-06-04  1:48     ` Daniel Shahaf
2020-06-04  2:43       ` Bart Schaefer
2020-06-04  4:06         ` Daniel Shahaf
2020-06-04  5:00           ` Bart Schaefer
2020-06-05  3:10             ` Daniel Shahaf
2020-06-05  3:18               ` Daniel Shahaf
2020-06-06  1:07               ` Bart Schaefer
2020-06-06  4:48                 ` Daniel Shahaf
2020-06-06  7:04                   ` Bart Schaefer
2020-06-04  6:31       ` Martin Tournoij
2020-06-05  2:22         ` Daniel Shahaf
2020-06-04  2:13     ` Vin Shelton
2020-06-04  2:35       ` Bart Schaefer
2020-06-04  2:36       ` Daniel Shahaf
2020-06-04 11:57         ` Vin Shelton [this message]
2020-06-04  5:06     ` Bart Schaefer
2020-06-04  5:41       ` Roman Perepelitsa
2020-06-05  2:07         ` Daniel Shahaf
2020-06-05  4:38           ` Roman Perepelitsa
2020-06-06  1:41             ` Bart Schaefer
2020-06-06  4:55               ` Daniel Shahaf
2020-06-06  6:25                 ` Roman Perepelitsa
2020-06-06  7:08                 ` Bart Schaefer
2020-06-06  8:03                   ` Daniel Shahaf
     [not found]           ` <1941572212.466119.1591360860372@mail2.virginmedia.com>
     [not found]             ` <e7f7dfe2-eb4a-457b-85fb-091935a74c0e@www.fastmail.com>
2020-06-06 11:57               ` Peter Stephenson
2020-06-06 12:48                 ` Roman Perepelitsa
2020-06-06 15:24                   ` Bart Schaefer
2020-06-06 16:24                     ` Peter Stephenson
2020-06-07 11:55                       ` Daniel Shahaf
2020-06-07 17:00                         ` Peter Stephenson
2020-06-08  3:27                           ` Daniel Shahaf
2020-06-08  9:30                             ` Peter Stephenson
2020-06-07 17:20                         ` Bart Schaefer
2020-06-06 15:09                 ` Bart Schaefer
2020-06-04  6:47       ` Martin Tournoij
2020-06-04  9:42       ` Peter Stephenson
2020-06-04 12:20         ` Roman Perepelitsa
2020-06-04 12:26           ` Peter Stephenson
2020-06-04 12:15     ` Peter Stephenson
2020-06-04 20:35       ` Bart Schaefer
2020-06-05  1:59         ` Daniel Shahaf

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CACeGjnV=4DZ0hzf9vi-H6A_AWePBiu5R-+jxm8nywFOF1nDgrQ@mail.gmail.com' \
    --to=acs@alumni.princeton.edu \
    --cc=d.s@daniel.shahaf.name \
    --cc=martin@arp242.net \
    --cc=p.stephenson@samsung.com \
    --cc=zsh-workers@zsh.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).