From 85cceba21b3a92942fcae7578bd02c67fc97a1d0 Mon Sep 17 00:00:00 2001 From: Nicholas Tay Date: Fri, 14 Jan 2022 00:07:53 +1100 Subject: Add grammar mappings to help message These should be quite useful since I forget what the mappings are sometimes, and maybe want to make a custom grammar. --- passgen.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/passgen.c b/passgen.c index ae2b19d..6f3670d 100644 --- a/passgen.c +++ b/passgen.c @@ -140,8 +140,12 @@ Usage: %s\n\ Hints:\n\ - No arguments generates with the default grammar.\n\ - If three numbers are provided, a password will be generated in the 'standard form', .\n\ -Compile-time options:\n\ +Compile-time options (edit `config.h` to customise!):\n\ - Default grammar: %s\n", argv[0], argv[0], argv[0], grammar_buf); + printf(" - Grammar mappings:\n"); + for (int i = 0; i < classes_n; ++i) { + printf(" - '%c' => \"%s\"\n", classes[i].c, classes[i].letters); + } return 0; } /* Take first argument as the grammar */ -- cgit