[Aide] patch2: --help output fixes

Vincent Danen vdanen at linsec.ca
Sat Jan 28 19:02:20 EET 2006


I find the output of aide --help to be extremely hard to read, so the
attached patch makes it much easier to read and condenses it somewhat
(more in style with other programs' --help output).

-- 
Annvix - Secure Linux Server: http://annvix.org/
"lynx -source http://linsec.ca/vdanen.asc | gpg --import"
{FEE30AD4 : 7F6C A60C 06C2 4811 FA1C  A2BC 2EBC 5E32 FEE3 0AD4}
Wasting time like it was free...
-------------- next part --------------
This patch makes the --help output look a little nicer

--- aide-0.11-rc2/src/aide.c.ver	2006-01-21 14:36:56.000000000 -0700
+++ aide-0.11-rc2/src/aide.c	2006-01-21 14:54:06.000000000 -0700
@@ -57,30 +57,23 @@
 void usage(int exitvalue)
 {
   fprintf(stderr, 
-	  _("Aide,\n"
-	    "Usage: aide <options> command\n"
-	    "\n"
+	  _("Aide " AIDEVERSION" \n\n"
+	    "Usage: aide [options] command\n\n"
 	    "Commands:\n"
-	    "-i\n--init\n\tInitialize the database\n"
-	    "-C\n--check\n\tCheck the database\n"
-	    "-u\n--update\n\t"
-	    "Check and update the database non-interactively.\n"
-	    "--compare\n\tCompare two databases\n"
-	    "-v\n--version\n\t"
-	    "Show version of AIDE and compilation options.\n"
-	    "-h\n--help\n\tShow this help message\n"
+	    "  -i, --init\t\tInitialize the database\n"
+	    "  -C, --check\t\tCheck the database\n"
+	    "  -u, --update\t\tCheck and update the database non-interactively\n"
+	    "      --compare\t\tCompare two databases\n\n"
+	    "Miscellaneous:\n"
+	    "      --config-check\tTest the configuration file\n"
+	    "  -v, --version\t\tShow version of AIDE and compilation options\n"
+	    "  -h, --help\t\tShow this help message\n\n"
 	    "Options:\n"
-	    "-c config_file\n--config=config_file\n\t"
-	    "Get config options from config_file.\n"
-	    "-B \"config_stuff\"\n--before=\"config_stuff\"\n\t"
-	    "Before config_file is read use these options.\n"
-	    "-A \"config_stuff\"\n--after=\"config_stuff\"\n\t"
-	    "After config_file is read use these options.\n"
-	    "-r reporter\n--report=reporter\n\t"
-	    "Where report output is written to.\n"
-	    "-Vverbosity_level\n--verbose=verbosity_level\n\t"
-	    "Level of debug messages.\n"
-	    "--config-check just read config-file\n"
+	    "  -c [cfgfile]\t--config=[cfgfile]\tGet config options from [cfgfile]\n"
+	    "  -B \"OPTION\"\t--before=\"OPTION\"\tBefore configuration file is read define OPTION\n"
+	    "  -A \"OPTION\"\t--after=\"OPTION\"\tAfter configuration file is read define OPTION\n"
+	    "  -r [reporter]\t--report=[reporter]\tWrite report output to [reporter] url\n"
+	    "  -V[level]\t--verbose=[level]\tSet debug message level to [level]\n"
 	    "\n")
 	  );
   
@@ -90,8 +83,8 @@
 void print_version(void)
 {
   fprintf(stderr,
-	  "Aide, version " AIDEVERSION "\n"
-	  "Compiled with the following options\n" AIDECOMPILEOPTIONS "\n");
+	  "Aide " AIDEVERSION "\n\n"
+	  "Compiled with the following options:\n\n" AIDECOMPILEOPTIONS "\n");
   exit(0);
 }
 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 186 bytes
Desc: not available
Url : https://mailman.cs.tut.fi/pipermail/aide/attachments/20060128/348b687e/attachment.bin


More information about the Aide mailing list