From d8d94a87ef4e1a572594f5458475a4dffae0d9a3 Mon Sep 17 00:00:00 2001 From: Sami Kerola Date: Sat, 22 Oct 2011 20:04:30 +0200 Subject: [PATCH] skill: add long options to usage output Signed-off-by: Sami Kerola --- skill.c | 44 +++++++++++++++++++++++--------------------- 1 file changed, 23 insertions(+), 21 deletions(-) diff --git a/skill.c b/skill.c index 76e7ea38..8c7f6ebc 100644 --- a/skill.c +++ b/skill.c @@ -267,14 +267,15 @@ static void __attribute__ ((__noreturn__)) kill_usage(FILE * out) fprintf(out, " %s [options] [...]\n", program_invocation_short_name); fputs(USAGE_OPTIONS, out); - fputs(_(" [...] send SIGTERM to every listed\n"), out); - fputs(_(" - specify the to be sent\n"), out); - fputs(_(" -s specify the to be sent\n"), out); - fputs(_(" -l list all signal names\n"), out); - fputs(_(" -L list all signal names in a nice table\n"), out); - fputs(_(" -l convert between signal numbers and names\n"), out); + fputs(_(" [...] send signal to every listed\n"), out); + fputs(_(" -, -s, --signal \n"), out); + fputs(_(" specify the to be sent\n"), out); + fputs(_(" -l, --list=[] list all signal names, or convert one to a name\n"), out); + fputs(_(" -L, --table list all signal names in a nice table\n"), out); fputs(USAGE_SEPARATOR, out); - fprintf(out, USAGE_MAN_TAIL("skill(1)")); + fputs(USAGE_HELP, out); + fputs(USAGE_VERSION, out); + fprintf(out, USAGE_MAN_TAIL("kill(1)")); exit(out == stderr ? EXIT_FAILURE : EXIT_SUCCESS); } @@ -293,22 +294,23 @@ static void __attribute__ ((__noreturn__)) skillsnice_usage(FILE * out) program_invocation_short_name); } fputs(USAGE_OPTIONS, out); - fputs(_(" -f fast mode (not implemented)\n"), out); - fputs(_(" -i interactive\n"), out); - fputs(_(" -l list all signal names\n"), out); - fputs(_(" -L list all signal names in a nice table\n"), - out); - fputs(_(" -n no action\n"), out); - fputs(_(" -v explain what is being done\n"), out); - fputs(_(" -w enable warnings (not implemented)\n"), out); - fputs(USAGE_VERSION, out); - fputs(_("\n"), out); + fputs(_(" -f, --fast fast mode (not implemented)\n"), out); + fputs(_(" -i, --interactive interactive\n"), out); + fputs(_(" -l, --list list all signal names\n"), out); + fputs(_(" -L, --table list all signal names in a nice table\n"), out); + fputs(_(" -n, --no-action no action\n"), out); + fputs(_(" -v, --verbose explain what is being done\n"), out); + fputs(_(" -w, --warnings enable warnings (not implemented)\n"), out); + fputs(USAGE_SEPARATOR, out); fputs(_("Expression can be: terminal, user, pid, command.\n"), out); fputs(_("The options below may be used to ensure correct interpretation.\n"), out); - fputs(_(" -c expression is a command name\n"), out); - fputs(_(" -p expression is a process id number\n"), out); - fputs(_(" -t expression is a terminal\n"), out); - fputs(_(" -u expression is a username\n"), out); + fputs(_(" -c, --command expression is a command name\n"), out); + fputs(_(" -p, --pid expression is a process id number\n"), out); + fputs(_(" -t, --tty expression is a terminal\n"), out); + fputs(_(" -u, --user expression is a username\n"), out); + fputs(USAGE_SEPARATOR, out); + fputs(USAGE_HELP, out); + fputs(USAGE_VERSION, out); if (program == PROG_SKILL) { fprintf(out, _("\n"