refactor argument system

- arguments can have multiple names simultaneously
- argument values can be passed using spaces (e.g., --arg value)
- single-character arguments can be passed using a single dash (e.g., --a -> -a)
- multiple single-character arguments can be combined (e.g., -a -b -> -ab)
- simplify custom arguments using generic classes
This commit is contained in:
2025-12-27 17:30:05 +01:00
parent 6be1957d82
commit 79629ae68d
17 changed files with 258 additions and 388 deletions

View File

@@ -1,5 +1,10 @@
package com.infendro.cli.exception.run
import com.infendro.cli.exception.CliException
class UnknownCommandException(
val command: String,
) : Exception()
) : CliException() {
override val message: String
get() = """unknown command "$command""""
}