aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicholas Tay <nick@windblume.net>2022-01-14 00:07:53 +1100
committerNicholas Tay <nick@windblume.net>2022-01-14 00:07:53 +1100
commit85cceba21b3a92942fcae7578bd02c67fc97a1d0 (patch)
tree7ff125e3ba1ca0d9637a7a8edd2dc4d7babddb97
parent42bd03b610153c4679e29001b859a1d783f9db69 (diff)
downloadpassgen-85cceba21b3a92942fcae7578bd02c67fc97a1d0.tar.gz
passgen-85cceba21b3a92942fcae7578bd02c67fc97a1d0.tar.bz2
passgen-85cceba21b3a92942fcae7578bd02c67fc97a1d0.zip
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.
-rw-r--r--passgen.c6
1 files changed, 5 insertions, 1 deletions
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', <triplets><symbols><numbers>.\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 */