coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Improvement for the rm utility


From: Bernhard Voelker
Subject: Re: Improvement for the rm utility
Date: Thu, 16 Oct 2025 19:25:05 +0200
User-agent: Mozilla Thunderbird

On 10/15/25 19:51, G. Branden Robinson wrote:

I second Bernhard, for what it's worth.  My only gripe is a small one; I
think the aforementioned output should be one message, not two.  (I
don't think diagnostic messages should worry about the terminal's line
length.  At most, usage and `--help` diagnostics should assume an
80-column device.)

Indeed, the 2 messages are issued on the same place in 'gl/lib/root-dev-ino.h':

# define ROOT_DEV_INO_WARN(Dirname)                                     \
  do                                                                    \
    {                                                                   \
      if (streq (Dirname, "/"))                                         \
        error (0, 0, _("it is dangerous to operate recursively on %s"), \
               quoteaf (Dirname));                                      \
      else                                                              \
        error (0, 0,                                                    \
               _("it is dangerous to operate recursively on %s (same as %s)"), \
               quoteaf_n (0, Dirname), quoteaf_n (1, "/"));             \
      error (0, 0, _("use --no-preserve-root to override this failsafe")); \
    }                                                                   \
  while (0)

We could squash it.

FWIW: this is not only used in rm(1), but also in other tools like chmod(1),
so mentioning "deletion" would be wrong.

Have a nice day,
Berny



reply via email to

[Prev in Thread] Current Thread [Next in Thread]