From a86015f73fdda878287a2ad21011594862bf506a Mon Sep 17 00:00:00 2001 From: "Jason St. John" Date: Tue, 3 Sep 2013 15:20:50 -0400 Subject: Improve --help switch output for pacman utils MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Unify the formatting of the --help switch for pacman utils, if it exists. All of the pacman utils will now output help text using the following format: util-name (pacman) v one line description of util's purpose Usage: util-name [options] -b, --bar whatever --bar does -f, --foo whatever --foo does -h, --help display this help message The --help switch does not exist for a couple of the utils, so the help/usage text for those will be displayed when the util is run with no arguments. Reported-by: Karol Błażewicz Signed-off-by: Jason St. John Signed-off-by: Allan McRae --- src/util/pacsort.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/util/pacsort.c') diff --git a/src/util/pacsort.c b/src/util/pacsort.c index 7c551c2b..687e558d 100644 --- a/src/util/pacsort.c +++ b/src/util/pacsort.c @@ -343,9 +343,10 @@ static char escape_char(const char *string) static void usage(void) { - fprintf(stderr, "pacsort v" PACKAGE_VERSION "\n" + fprintf(stderr, "pacsort (pacman) v" PACKAGE_VERSION "\n\n" + "A sort utility implementing alpm_pkg_vercmp.\n\n" "Usage: pacsort [options] [files...]\n\n" - " -f, --files assume inputs are filepaths of packages\n" + " -f, --files assume inputs are file paths of packages\n" " -h, --help display this help message\n" " -k, --key sort input starting on specified column\n" " -r, --reverse sort in reverse order (default: oldest to newest)\n" -- cgit v1.2.3-24-g4f1b