Add -R as a synonym to -r for cp(1)

List the available options in the usage line as well.
This commit is contained in:
sin
2013-12-12 13:27:49 +00:00
parent 7f6d5653c6
commit aff51008ea
2 changed files with 7 additions and 3 deletions

3
cp.c
View File

@@ -8,7 +8,7 @@
static void
usage(void)
{
eprintf("usage: %s source... dest\n", argv0);
eprintf("usage: %s [-Rr] source... dest\n", argv0);
}
int
@@ -17,6 +17,7 @@ main(int argc, char *argv[])
struct stat st;
ARGBEGIN {
case 'R':
case 'r':
cp_rflag = true;
break;