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=FREEMAIL_FROM, MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 13154 invoked from network); 4 Jun 2020 11:58: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 11:58:35 -0000 Received: (qmail 3925 invoked by alias); 4 Jun 2020 11:58:30 -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: 45967 Received: (qmail 14818 invoked by uid 1010); 4 Jun 2020 11:58:29 -0000 X-Qmail-Scanner-Diagnostics: from mail-ot1-f43.google.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(209.85.210.43):SA:0(-1.4/5.0):. Processed in 1.472076 secs); 04 Jun 2020 11:58:29 -0000 X-Envelope-From: ethersoft@gmail.com X-Qmail-Scanner-Mime-Attachments: | X-Qmail-Scanner-Zip-Files: | Received-SPF: pass (ns1.primenet.com.au: SPF record at _netblocks.google.com designates 209.85.210.43 as permitted sender) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=ZaRFORvhXfGjSVxA6JLTA6faiJ3B4LHts9KeGMfdLMg=; b=Iptll3H+80M5pKND7uXuZk+HEJi3AS8d/PU2Ed6WnnTIvBaNVDldqZ0r/xY9XxDNH1 XoCKTwafsrYn5gaJ5V4+N6vnSHlLcDNbtpsWle+Cpo/nUf7NE0O1rzyG76EYIb5bzcjL IkeMQ22RVSjFflNZF2GsnilOUAgK0DHq0dZauzWtEve15O8GYM/lH4qac1h6lIFRERdp daWaPrFCSK4Y7K1sViaIaBnxdhPP6DWuVhBjlEa/ZTbJrn/YOshrPIkfNwTtmfZZQGPv +blS64k7rkTSVnoEGHP1PL6Vcc9gRGwHFG862IDymjFpvyCJyHHNQtOqDQDH8GDsn9jn /OVQ== X-Gm-Message-State: AOAM530AUS3Bgth0l2lVFcNSfD+wNl2rErHcc34W4OxguUHCnFX0yMfl rBsi1AigBCE89hdJa4Ns2Zi2xT68r9qL+4tvVDs= X-Google-Smtp-Source: ABdhPJxj1DWNPxNfBwHq9CF1wl8Rpx2RkYNPLowR1J6cy+tAXDjmtyJKyYD1/AMm/O4eJZ1xxZLP9I2h4Md2COdJOIM= X-Received: by 2002:a9d:5e01:: with SMTP id d1mr3294064oti.20.1591271874541; Thu, 04 Jun 2020 04:57:54 -0700 (PDT) MIME-Version: 1.0 References: <89aed74d-db7b-47ad-b218-8158838049e9@www.fastmail.com> <94e73ebcf39d4d3f9c7ae257b1d75d16@CAMSVWEXC01.scsc.local> <20200604023650.6093bda4@tarpaulin.shahaf.local2> In-Reply-To: <20200604023650.6093bda4@tarpaulin.shahaf.local2> From: Vin Shelton Date: Thu, 4 Jun 2020 07:57:18 -0400 Message-ID: Subject: Re: Any way to allow clobbering empty files when noclobber is set? To: Daniel Shahaf Cc: Peter Stephenson , Martin Tournoij , "zsh-workers@zsh.org" Content-Type: multipart/alternative; boundary="000000000000d2bd6e05a740da18" --000000000000d2bd6e05a740da18 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable 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 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 > - =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 does= n'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 thi= ng > > > > I rather miss though: the 'notempty' option in 'noclobber'. > > > > > > This isn't actually hard to implement. What does everyone else think= ? > > > > > > pws > > > > > --000000000000d2bd6e05a740da18--