Sync program's usage() with manpage's SYNOPSIS.
This commit is contained in:
parent
b3f44d7907
commit
a89237ae95
@ -331,7 +331,8 @@ usage(void)
|
||||
{
|
||||
|
||||
(void)fprintf(stderr, "%s\n%s\n",
|
||||
"usage: cp [-R [-H | -L | -P]] [-f | -i | -n] [-pv] src target",
|
||||
" cp [-R [-H | -L | -P]] [-f | -i | -n] [-pv] src1 ... srcN directory");
|
||||
"usage: cp [-R [-H | -L | -P]] [-f | -i | -n] [-pv] source_file target_file",
|
||||
" cp [-R [-H | -L | -P]] [-f | -i | -n] [-pv] source_file ... "
|
||||
"target_directory");
|
||||
exit(EX_USAGE);
|
||||
}
|
||||
|
@ -99,7 +99,7 @@ int lineno; /* script line number */
|
||||
const char *prompt; /* command-line prompt */
|
||||
const char *dps = "*"; /* default command-line prompt */
|
||||
|
||||
const char usage[] = "usage: %s [-] [-sx] [-p string] [name]\n";
|
||||
const char usage[] = "usage: %s [-] [-sx] [-p string] [file]\n";
|
||||
|
||||
/* ed: line editor */
|
||||
int
|
||||
@ -134,7 +134,7 @@ main(int argc, char *argv[])
|
||||
break;
|
||||
|
||||
default:
|
||||
fprintf(stderr, usage, argv[0]);
|
||||
fprintf(stderr, usage, red ? "red" : "ed");
|
||||
exit(1);
|
||||
}
|
||||
argv += optind;
|
||||
|
@ -52,7 +52,7 @@ static void
|
||||
usage(void)
|
||||
{
|
||||
|
||||
fprintf(stderr, "getfacl [-dh] [files ...]\n");
|
||||
fprintf(stderr, "getfacl [-dh] [file ...]\n");
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -236,8 +236,8 @@ void
|
||||
usage(void)
|
||||
{
|
||||
(void)fprintf(stderr, "%s\n%s\n%s\n",
|
||||
"usage: ln [-fhinsv] file1 file2",
|
||||
" ln [-fhinsv] file ... directory",
|
||||
" link file1 file2");
|
||||
"usage: ln [-fhinsv] source_file [target_file]",
|
||||
" ln [-fhinsv] source_file ... target_dir",
|
||||
" link source_file target_file");
|
||||
exit(1);
|
||||
}
|
||||
|
@ -222,9 +222,9 @@ usage(void)
|
||||
{
|
||||
(void)fprintf(stderr,
|
||||
#ifdef COLORLS
|
||||
"usage: ls [-ABCFGHLPRTWZabcdfghiklmnoqrstuwx1]"
|
||||
"usage: ls [-ABCFGHLPRTWZabcdfghiklmnopqrstuwx1]"
|
||||
#else
|
||||
"usage: ls [-ABCFHLPRTWZabcdfghiklmnoqrstuwx1]"
|
||||
"usage: ls [-ABCFHLPRTWZabcdfghiklmnopqrstuwx1]"
|
||||
#endif
|
||||
" [file ...]\n");
|
||||
exit(1);
|
||||
|
@ -204,6 +204,7 @@ void
|
||||
usage(void)
|
||||
{
|
||||
|
||||
(void)fprintf(stderr, "usage: mkdir [-pv] [-m mode] directory ...\n");
|
||||
(void)fprintf(stderr,
|
||||
"usage: mkdir [-pv] [-m mode] directory_name ...\n");
|
||||
exit (EX_USAGE);
|
||||
}
|
||||
|
@ -38,14 +38,13 @@
|
||||
.Sh SYNOPSIS
|
||||
.Nm
|
||||
.Op Fl aCcefHhjlmrSTuvwXxZ
|
||||
.Op Fl O Ar fmt | Fl o Ar fmt
|
||||
.Op Fl G Ar gid Ns Op , Ns Ar gid Ns Ar ...
|
||||
.Op Fl M Ar core
|
||||
.Op Fl N Ar system
|
||||
.Op Fl O Ar fmt
|
||||
.Op Fl o Ar fmt
|
||||
.Op Fl p Ar pid Ns Op , Ns Ar pid Ns Ar ...
|
||||
.Op Fl t Ar tty Ns Op , Ns Ar tty Ns Ar ...
|
||||
.Op Fl U Ar username Ns Op , Ns Ar username Ns Ar ...
|
||||
.Op Fl U Ar user Ns Op , Ns Ar user Ns Ar ...
|
||||
.Nm
|
||||
.Op Fl L
|
||||
.Sh DESCRIPTION
|
||||
|
@ -1191,12 +1191,12 @@ check_procfs(void)
|
||||
static void
|
||||
usage(void)
|
||||
{
|
||||
#define SINGLE_OPTS "[-aCc" OPT_LAZY_f "HhjlmrSTuvwXxZ]"
|
||||
#define SINGLE_OPTS "[-aCce" OPT_LAZY_f "HhjlmrSTuvwXxZ]"
|
||||
|
||||
(void)fprintf(stderr, "%s\n%s\n%s\n%s\n",
|
||||
"usage: ps " SINGLE_OPTS " [-G gid[,gid]] [-O|o fmt]",
|
||||
" [-p pid[,pid]] [-t tty[,tty]] [-U user[,user]]",
|
||||
"usage: ps " SINGLE_OPTS " [-O fmt | -o fmt] [-G gid[,gid...]]",
|
||||
" [-M core] [-N system]",
|
||||
" [-p pid[,pid...]] [-t tty[,tty...]] [-U user[,user...]]",
|
||||
" ps [-L]");
|
||||
exit(1);
|
||||
}
|
||||
|
@ -97,7 +97,7 @@ void
|
||||
usage(void)
|
||||
{
|
||||
|
||||
(void)fprintf(stderr, "usage: pwd [-LP]\n");
|
||||
(void)fprintf(stderr, "usage: pwd [-L | -P]\n");
|
||||
exit(1);
|
||||
}
|
||||
|
||||
|
@ -759,8 +759,8 @@ void
|
||||
usage(void)
|
||||
{
|
||||
(void)fprintf(stderr, "%s\n%s\n",
|
||||
"usage: rcp [-46p] f1 f2",
|
||||
" rcp [-46pr] f1 ... fn directory");
|
||||
"usage: rcp [-46p] file1 file2",
|
||||
" rcp [-46pr] file ... directory");
|
||||
exit(1);
|
||||
}
|
||||
|
||||
|
@ -41,7 +41,8 @@
|
||||
.Nd remove directory entries
|
||||
.Sh SYNOPSIS
|
||||
.Nm
|
||||
.Op Fl dfiIPRrvW
|
||||
.Op Fl f | i
|
||||
.Op Fl dIPRrvW
|
||||
.Ar
|
||||
.Nm unlink
|
||||
.Ar file
|
||||
|
@ -35,9 +35,9 @@
|
||||
.Nm
|
||||
.Op Fl bdhkn
|
||||
.Op Fl m Ar entries
|
||||
.Op Fl M Ar file1
|
||||
.Op Fl M Ar file
|
||||
.Op Fl x Ar entries
|
||||
.Op Fl X Ar file1
|
||||
.Op Fl X Ar file
|
||||
.Op Ar
|
||||
.Sh DESCRIPTION
|
||||
The
|
||||
|
@ -96,8 +96,8 @@ static void
|
||||
usage(void)
|
||||
{
|
||||
|
||||
fprintf(stderr, "usage: setfacl [-bdhkn] [-m entries] [-M file1] "
|
||||
"[-x entries] [-X file2] [file ...]\n");
|
||||
fprintf(stderr, "usage: setfacl [-bdhkn] [-m entries] [-M file] "
|
||||
"[-x entries] [-X file] [file ...]\n");
|
||||
exit(1);
|
||||
}
|
||||
|
||||
|
@ -40,15 +40,15 @@
|
||||
.Nd set the options for a terminal device interface
|
||||
.Sh SYNOPSIS
|
||||
.Nm
|
||||
.Op Fl a | Fl e | Fl g
|
||||
.Op Fl a | e | g
|
||||
.Op Fl f Ar file
|
||||
.Op operands
|
||||
.Op Ar arguments
|
||||
.Sh DESCRIPTION
|
||||
The
|
||||
.Nm
|
||||
utility sets or reports on terminal
|
||||
characteristics for the device that is its standard input.
|
||||
If no options or operands are specified, it reports the settings of a subset
|
||||
If no options or arguments are specified, it reports the settings of a subset
|
||||
of characteristics as well as additional ones if they differ from their
|
||||
default values.
|
||||
Otherwise it modifies
|
||||
|
@ -155,6 +155,7 @@ void
|
||||
usage(void)
|
||||
{
|
||||
|
||||
(void)fprintf(stderr, "usage: stty [-a|-e|-g] [-f file] [options]\n");
|
||||
(void)fprintf(stderr,
|
||||
"usage: stty [-a | -e | -g] [-f file] [arguments]\n");
|
||||
exit (1);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user