Mercurial > cgi-bin > hgweb.cgi > PassMan
diff src/main/kotlin/name/blackcap/passman/QuitSubcommand.kt @ 24:2188b2f13326
Make some minor tweaks to the help system.
author | David Barts <n5jrn@me.com> |
---|---|
date | Wed, 03 Jul 2024 17:14:22 -0700 |
parents | |
children |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/main/kotlin/name/blackcap/passman/QuitSubcommand.kt Wed Jul 03 17:14:22 2024 -0700 @@ -0,0 +1,13 @@ +package name.blackcap.passman + +// This command does nothing except print a help message if requested, +// so that "help quit" works. The actual quit logic is hard-coded in +// Main.kt (and needs to be, so that exit status is correct). +class QuitSubcommand(): Subcommand() { + override fun run(args: Array<String>) { + if (args.isNotEmpty() && (args[0] == "-h" || args[0].startsWith("--h"))) { + println("usage: passman quit [options]") + println(" -h,--help Print this help message.") + } + } +}