coreutils
[Top][All Lists]
Advanced

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

Re: Simpler name for --no-clobber option


From: Bernhard Voelker
Subject: Re: Simpler name for --no-clobber option
Date: Thu, 12 Mar 2020 08:45:25 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.5.0

On 2020-03-12 04:21, Tomas Zubiri wrote:
> The reason for not including this change is reasonable and expected
> resistance: " While the new name may be clearer
> scripts using it would not be compat with older cp implementations.
> Hence the incompatability introduced would not be worth it."
__________________________________________________________^^

I agree with Padraig here, and the reasoning IMO is behind the word "it".
It may not be obvious, but I think this refers to "adding an alias for a
long option".

Looking around in a couple of the coreutils like cp, mv, rm, ln, od, ...
there are no aliases apart from some very few exceptions; for a good reason:
as you wrote, the reason is stability, and also maintainability.
Also, we don't want to pollute the namespace of long options as having more
long options for the same thing may confuse more users (leading to questions
like "hey, what's the difference between --no-clobber and --no-overwrite;
are they really the same?").

Finally, as a non-English native speaker, I wouldn't care too much whether
this option it is named '--no-clobber' or something else.  That name may
not be overly correct in its strictest sense; maybe it's an allusion to
the term "globbing" (due to accidentally resolving a shell pattern to an
existing file name and therefore having 'cp' to refuse to destroy such an
already existing file).  This seems something good to remember as a user.

Anyway, the --help output already makes it pretty clear already:

  -n, --no-clobber             do not overwrite an existing file (overrides
                                 a previous -i option)

Thus, "not be worth it" seems to be a brief yet valid description for the
arguments for not adding an alias.

Have a nice day,
Berny




reply via email to

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