bug-coreutils
[Top][All Lists]
Advanced

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

Re: [PATCH] make "cp -i -f" behaves like "cp -f" instead of like "cp -i"


From: Thierry Vignaud
Subject: Re: [PATCH] make "cp -i -f" behaves like "cp -f" instead of like "cp -i"
Date: Thu, 31 Aug 2006 15:43:17 +0200
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux)

Eric Blake <address@hidden> writes:

> The mailing list is probably a better place for this discussion than
> cc'ing lots of individuals.  I'm adding bug-coreutils accordingly.

ok, killing cc: but me (not being subscribed)

> >>> The following patch makes now "cp -i -f" behaves like "cp -f"
> >>> instead of like "cp -i".
> >>>
> >>> We think that behavior is what end users would predict.
> >> Thanks for the effort, but POSIX requires the current behavior:
> >> http://www.opengroup.org/onlinepubs/009695399/nframe.html
> >> especially step 3a, where -i must be handled before -f.
> > 
> > humm.
> > 
> > The problem is that:
> > - one could expect -i to "win" in 'cp -f -i' and -f to win in 'cp
> >   -i -f'
> > - if a distro define a default alias 'cp -i' for cp in order to
> >   prevent users to shoot themselves in the foot, it's nice to be
> >   able to overwrite it.
> 
> The user can undo what the distro did, either in their startup
> scripts, or with the one-shot \cp.

/bin/cp and \cp are less intuitive

> > I may be misreading but I've read
> > http://www.opengroup.org/onlinepubs/009695399/utilities/cp.html
> > and I don't see anything that .

(...)
 
> It doesn't matter whether you specified -if or -fi; step 3a states
> that if -i is in effect (regardless of -f), that you execute
> 3a.i. and prompt the user prior to executing 3a.iii. of possibly
> unlinking the destination from -f.

indeed.
 
> > > One other thing: make your patch against CVS head, not 5.93
> > > (5.97 is the latest stable release, and 6.1 has already been
> > > released as a beta).
> > 
> > actually, it applies fine on top of 5.93.
> 
> That's my point - 5.93 is stale, and a patch should apply on top of
> CVS head (6.1+).

sorry I meant s/5.93/5.97/




reply via email to

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