On 19.11.2022 23.46, Alan Potteiger wrote:
diff --git a/mv.c b/mv.c
index 8441f9c..51efde5 100644
--- a/mv.c
+++ b/mv.c
@@ -49,6 +57,9 @@ main(int argc, char *argv[])
ARGBEGIN {
case 'f':
break;
+ case 'i':
+ mv_iflag = 1;
+ break;
default:
usage();
} ARGEND
diff --git a/rm.c b/rm.c
index 8bebfcb..70da082 100644
--- a/rm.c
+++ b/rm.c
@@ -19,6 +19,9 @@ main(int argc, char *argv[])
case 'f':
r.flags |= SILENT;
break;
+ case 'i':
+ rm_iflag = 1;
+ break;
case 'R':
case 'r':
r.maxdepth = 0;
The POSIX specification says that for mv[0] and rm[1], -f and -i cancel
each other out, with the last taking effect.
[0]: https://pubs.opengroup.org/onlinepubs/009604599/utilities/mv.html
[1]: https://pubs.opengroup.org/onlinepubs/009604599/utilities/rm.html
--
Santtu