[hackers] [sbase] Add mandoc-manpage for rm(1) || FRIGN

From: <git_AT_suckless.org>
Date: Fri, 30 Jan 2015 11:37:11 +0100 (CET)

commit f7ca87ed103390d3869ae7d73d78d69989a88d59
Author: FRIGN <dev_AT_frign.de>
Date: Fri Jan 30 11:34:05 2015 +0100

    Add mandoc-manpage for rm(1)
    
    and mark it as finished in README.

diff --git a/README b/README
index cc7d1ee..eb41af8 100644
--- a/README
+++ b/README
_AT_@ -55,7 +55,7 @@ The following tools are implemented ('*' == finished, '#' == UTF-8 support,
 =* pwd yes none
 = readlink non-posix none
 =* renice yes none
-= rm yes (-i)
+=* rm yes (-i)
 = rmdir no -p
 = setsid non-posix none
 = sleep yes none
diff --git a/rm.1 b/rm.1
index a342bfa..6ba2e13 100644
--- a/rm.1
+++ b/rm.1
_AT_@ -1,22 +1,40 @@
-.TH RM 1 sbase\-VERSION
-.SH NAME
-rm \- remove files and directories
-.SH SYNOPSIS
-.B rm
-.RB [ \-fRr ]
-.RI [ file ...]
-.SH DESCRIPTION
-.B rm
-removes the given files and directories.
-.SH OPTIONS
-.TP
-.B \-f
-ignore files that cannot be removed.
-.TP
-.B \-R
-equivalent to -r.
-.TP
-.B \-r
-remove directories recursively.
-.SH SEE ALSO
-.IR remove (3)
+.Dd January 30, 2015
+.Dt RM 1 sbase\-VERSION
+.Sh NAME
+.Nm rm
+.Nd remove directory entries
+.Sh SYNOPSIS
+.Nm rm
+.Op Fl f | Fl i
+.Op Fl Rr
+.Ar file ...
+.Sh DESCRIPTION
+.Nm
+removes each
+.Ar file .
+If
+.Ar file
+is a directory, it has to be empty unless
+.Fl R
+or
+.Fl r
+is specified.
+.Sh OPTIONS
+.Bl -tag -width Ds
+.It Fl f | Fl i
+Do not prompt | Prompt before removing
+.Ar file .
+In the former case, do not report when
+.Ar file
+doesn't exist or couldn't be removed.
+.It Fl Rr
+Remove directories recursively.
+.El
+.Sh SEE ALSO
+.Xr remove 3
+.Sh STANDARDS
+The
+.Nm
+utility is compliant with the
+.St -p1003.1-2008
+specification except from prompting.
diff --git a/rm.c b/rm.c
index a27dcb4..d6e3504 100644
--- a/rm.c
+++ b/rm.c
_AT_@ -10,7 +10,7 @@
 static void
 usage(void)
 {
- eprintf("usage: %s [-fRr] FILE...\n", argv0);
+ eprintf("usage: %s [-f | -i] [-Rr] file ...\n", argv0);
 }
 
 int
_AT_@ -20,6 +20,9 @@ main(int argc, char *argv[])
         case 'f':
                 rm_fflag = 1;
                 break;
+ case 'i':
+ rm_fflag = 0;
+ break;
         case 'R':
         case 'r':
                 rm_rflag = 1;
Received on Fri Jan 30 2015 - 11:37:11 CET

This archive was generated by hypermail 2.3.0 : Fri Jan 30 2015 - 11:48:12 CET