Hi,

Regarding to the manpage and comments in rm.c,
the option -I of rm is meant to be the same as --interactive=once

It isn't, since when removing a write-protected file,
rm prompts if --interactive=once is given, 
but it doesn't prompt, if -I is given.

This behaviour of rm -I is surprising, 
since rm even prompts before removing a write-protected file, 
if no extra interactivity is asked for.

It can be changed easily by changing line 268 of rm.c

from

x.interactive = RMI_NEVER;

to

x.interactive = RMI_SOMETIMES;

(see attached diff)


--- src/rm.c	2008-12-10 00:31:33.000000000 +0100
+++ src/rm-new.c	2008-12-10 00:33:24.000000000 +0100
@@ -265,7 +265,7 @@
 	  break;
 
 	case 'I':
-	  x.interactive = RMI_NEVER;
+	  x.interactive = RMI_SOMETIMES;
 	  x.ignore_missing_files = false;
 	  prompt_once = true;
 	  break;
_______________________________________________
Bug-coreutils mailing list
Bug-coreutils@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-coreutils

Reply via email to