From: Andre Date: Sun, 5 Mar 2006 12:40:43 +0000 (+0100) Subject: para_filter: Fix and improve help text for --list_filters X-Git-Tag: v0.2.11~33^2~3 X-Git-Url: http://git.tuebingen.mpg.de/?p=paraslash.git;a=commitdiff_plain;h=501a1c5954e65f51d931803f0145a19a652e5e49;hp=4ec8346e151daa4665cb4255da6592e939a6d4f7 para_filter: Fix and improve help text for --list_filters The old help text still used colons as separators. Mark those filters which have their own command line parser with a star in the filter list. Some trivial whitespace fixes also. --- diff --git a/filter.c b/filter.c index 04997cf2..2cd6d09d 100644 --- a/filter.c +++ b/filter.c @@ -95,7 +95,7 @@ static void open_filters(void) static int parse_config(int argc, char *argv[]) { static char *cf; /* config file */ - struct stat statbuf; + struct stat statbuf; int i; if (cmdline_parser(argc, argv, &conf)) @@ -105,7 +105,7 @@ static int parse_config(int argc, char *argv[]) cf = make_message("%s/.paraslash/filter.conf", home); free(home); } - if (!stat(cf, &statbuf)) { + if (!stat(cf, &statbuf)) { if (cmdline_parser_configfile(cf, &conf, 0, 0, 0)) return -E_FILTER_SYNTAX; } @@ -113,8 +113,10 @@ static int parse_config(int argc, char *argv[]) return 1; printf("available filters: "); for (i = 0; filters[i].name; i++) - printf("%s%s", i? " " : "", filters[i].name); - printf("\nTry para_filter -f:-h for help on \n"); + printf("%s%s%s", i? " " : "", filters[i].name, + filters[i].parse_config? "*": ""); + printf("\nFilters marked with \"*\" have further command line options. Try\n" + "\tpara_filter -f ' -h'\nfor more information.\n"); exit(EXIT_SUCCESS); }