feat: Adds generate-config command.

This commit is contained in:
2024-11-29 20:32:32 -05:00
parent 84b002c997
commit 505f7d8013
8 changed files with 143 additions and 30 deletions

View File

@@ -1,5 +1,27 @@
import ArgumentParser
struct BasicGlobalOptions: ParsableArguments {
@Flag(
name: .shortAndLong,
help: "Increase logging level (can be passed multiple times)."
)
var verbose: Int
@Flag(
name: .shortAndLong,
help: "Supress logging."
)
var quiet = false
@Option(
name: .shortAndLong,
help: "Optional shell to use when calling shell commands.",
completion: .file()
)
var shell: String?
}
struct GlobalOptions: ParsableArguments {
@Option(
@@ -14,29 +36,12 @@ struct GlobalOptions: ParsableArguments {
)
var inventoryPath: String?
@Flag(
name: .shortAndLong,
help: "Increase logging level (can be passed multiple times)."
)
var verbose: Int
@Flag(
name: .shortAndLong,
help: "Supress logging."
)
var quiet = false
@Flag(
name: .long,
help: "Supress only playbook logging."
)
var quietOnlyPlaybook = false
@Option(
name: .shortAndLong,
help: "Optional shell to use when calling shell commands.",
completion: .file()
)
var shell: String?
@OptionGroup var basic: BasicGlobalOptions
}