bug-coreutils
[Top][All Lists]
Advanced

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

Interactivity (-i) and non-interactivity


From: Jan Engelhardt
Subject: Interactivity (-i) and non-interactivity
Date: Sun, 11 Mar 2007 17:28:56 +0100 (MET)

Hello,


by default, coreutils cp will overwrite a file. Hence I put in

        alias cp='/bin/cp -i'

into the system-wide profile. However, users wishing to override the 
now-system-default of interactivity cannot do so because -f does not 
cancel -i, and --reply is deprecated. The "mv" and "rm" programs 
however, do The Right Thing, along the lines of

        case 'f':
                x.interactive = false;

"cp" on the other hand is missing this. The following patch adds it in.


Signed-off-by: Jan Engelhardt <address@hidden>

---
 cp.c |    1 +
 1 file changed, 1 insertion(+)

Index: coreutils-6.4/src/cp.c
===================================================================
--- coreutils-6.4.orig/src/cp.c
+++ coreutils-6.4/src/cp.c
@@ -893,6 +893,7 @@ main (int argc, char **argv)
          break;
 
        case 'f':
+         x.interactive = I_ALWAYS_YES;
          x.unlink_dest_after_failed_open = true;
          break;
 
#EOF




reply via email to

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