comparison src/main/kotlin/name/blackcap/passman/UpdateSubcommand.kt @ 13:302d224bbd57

Improve help messages and csv error reportage.
author David Barts <n5jrn@me.com>
date Tue, 24 Jan 2023 20:13:13 -0800
parents cbe4c797c9a6
children ea65ab890f66
comparison
equal deleted inserted replaced
12:a38a2a1036c3 13:302d224bbd57
38 38
39 private fun parseArguments(args: Array<String>) { 39 private fun parseArguments(args: Array<String>) {
40 val options = Options().apply { 40 val options = Options().apply {
41 addOption("g", GENERATE, false, "Use password generator.") 41 addOption("g", GENERATE, false, "Use password generator.")
42 addOption("h", HELP, false, "Print this help message.") 42 addOption("h", HELP, false, "Print this help message.")
43 addOption("l", LENGTH, true, "Length of generated password.") 43 addOption("l", LENGTH, true, "Length of generated password (default $DEFAULT_GENERATED_LENGTH).")
44 addOption("s", SYMBOLS, false, "Use symbol characters in generated password.") 44 addOption("s", SYMBOLS, false, "Use symbol characters in generated password.")
45 addOption("v", VERBOSE, false, "Print the generated password.") 45 addOption("v", VERBOSE, false, "Print the generated password.")
46 } 46 }
47 try { 47 try {
48 commandLine = DefaultParser().parse(options, args) 48 commandLine = DefaultParser().parse(options, args)