Add [arg ...] after command in SYNOPSIS and usage output.

Use Ar markup when referring to the command and args.
This commit is contained in:
Todd C. Miller
2022-12-20 09:09:25 -07:00
parent 9d5ed2f9ef
commit eada918bbb
4 changed files with 651 additions and 305 deletions

View File

@@ -52,7 +52,7 @@ sudo_noreturn static void usage_excl(void);
sudo_noreturn static void usage_excl_ticket(void);
/*
* Mapping of command line flags to name/value settings.
* Mapping of command line options to name/value settings.
* Do not reorder, indexes must match ARG_ defines in sudo.h.
*/
static struct sudo_settings sudo_settings[] = {

View File

@@ -27,8 +27,8 @@
#define SUDO_USAGE0 " -h | -V"
#define SUDO_USAGE1 " -h | -K | -k | -V"
#define SUDO_USAGE2 " -v [-ABkNnS] @BSDAUTH_USAGE@[-g group] [-h host] [-p prompt] [-u user]"
#define SUDO_USAGE3 " -l [-ABkNnS] @BSDAUTH_USAGE@[-g group] [-h host] [-p prompt] [-U user] [-u user] [command]"
#define SUDO_USAGE4 " [-ABbEHkNnPS] @BSDAUTH_USAGE@@SELINUX_USAGE@[-C num] [-D directory] @LOGINCAP_USAGE@[-g group] [-h host] [-p prompt] [-R directory] [-T timeout] [-u user] [VAR=value] [-i|-s] [<command>]"
#define SUDO_USAGE3 " -l [-ABkNnS] @BSDAUTH_USAGE@[-g group] [-h host] [-p prompt] [-U user] [-u user] [command [arg ...]]"
#define SUDO_USAGE4 " [-ABbEHkNnPS] @BSDAUTH_USAGE@@SELINUX_USAGE@[-C num] [-D directory] @LOGINCAP_USAGE@[-g group] [-h host] [-p prompt] [-R directory] [-T timeout] [-u user] [VAR=value] [-i | -s] [command [arg ...]]"
#define SUDO_USAGE5 " -e [-ABkNnS] @BSDAUTH_USAGE@@SELINUX_USAGE@[-C num] @LOGINCAP_USAGE@[-D directory] [-g group] [-h host] [-p prompt] [-R directory] [-T timeout] [-u user] file ..."
/*