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/pactree.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src/util/pactree.c') diff --git a/src/util/pactree.c b/src/util/pactree.c index 42c75aaf..3d55d9f1 100644 --- a/src/util/pactree.c +++ b/src/util/pactree.c @@ -310,9 +310,10 @@ static int parse_options(int argc, char *argv[]) static void usage(void) { - fprintf(stderr, "pactree v" PACKAGE_VERSION "\n" + fprintf(stderr, "pactree (pacman) v" PACKAGE_VERSION "\n\n" + "A simple dependency tree viewer.\n\n" "Usage: pactree [options] PACKAGE\n\n" - " -a, --ascii use ascii characters for tree formatting\n" + " -a, --ascii use ASCII characters for tree formatting\n" " -b, --dbpath set an alternate database location\n" " -c, --color colorize output\n" " -d, --depth <#> limit the depth of recursion\n" @@ -320,7 +321,7 @@ static void usage(void) " -h, --help display this help message\n" " -l, --linear enable linear output\n" " -r, --reverse list packages that depend on the named package\n" - " -s, --sync search sync DBs instead of local\n" + " -s, --sync search sync databases instead of local\n" " -u, --unique show dependencies with no duplicates (implies -l)\n" " --config set an alternate configuration file\n"); } -- cgit v1.2.3-70-g09d2