[hackers] [sbase] Add -R as a synonym to -r for rm(1) || sin

From: <git_AT_suckless.org>
Date: Thu, 12 Dec 2013 14:16:20 +0100

commit 7f6d5653c68ae79e29f234bf929409ef60e4650b
Author: sin <sin_AT_2f30.org>
Date: Thu Dec 12 13:15:07 2013 +0000

    Add -R as a synonym to -r for rm(1)
    
    Some scripts require this.

diff --git a/rm.1 b/rm.1
index 3adbf3f..a342bfa 100644
--- a/rm.1
+++ b/rm.1
_AT_@ -3,7 +3,7 @@
 rm \- remove files and directories
 .SH SYNOPSIS
 .B rm
-.RB [ \-fr ]
+.RB [ \-fRr ]
 .RI [ file ...]
 .SH DESCRIPTION
 .B rm
_AT_@ -13,6 +13,9 @@ removes the given files and directories.
 .B \-f
 ignore files that cannot be removed.
 .TP
+.B \-R
+equivalent to -r.
+.TP
 .B \-r
 remove directories recursively.
 .SH SEE ALSO
diff --git a/rm.c b/rm.c
index e1dbdf3..0413ada 100644
--- a/rm.c
+++ b/rm.c
_AT_@ -10,7 +10,7 @@
 static void
 usage(void)
 {
- eprintf("usage: %s [-fr] FILE...
", argv0);
+ eprintf("usage: %s [-fRr] FILE...
", argv0);
 }
 
 int
_AT_@ -20,6 +20,7 @@ main(int argc, char *argv[])
         case 'f':
                 rm_fflag = true;
                 break;
+ case 'R':
         case 'r':
                 rm_rflag = true;
                 break;
Received on Thu Dec 12 2013 - 14:16:20 CET

This archive was generated by hypermail 2.3.0 : Thu Dec 12 2013 - 14:24:14 CET