feat: Updates 'extraArgs' naming to 'extraOptions' as it's more inline with the usage of them
This commit is contained in:
@@ -25,7 +25,13 @@ func createAbstract(_ string: String) -> String {
|
||||
|
||||
extension Usage where Content == AnyTextNode {
|
||||
|
||||
static func `default`(commandName: String, parentCommand: String?) -> Self {
|
||||
static func `default`(
|
||||
commandName: String,
|
||||
parentCommand: String?,
|
||||
usesArguments: Bool = true,
|
||||
usesOptions: Bool = true,
|
||||
usesExtraArguments: Bool = true
|
||||
) -> Self {
|
||||
.init {
|
||||
HStack {
|
||||
HStack {
|
||||
@@ -37,10 +43,16 @@ extension Usage where Content == AnyTextNode {
|
||||
}
|
||||
.color(.blue).bold()
|
||||
|
||||
"[OPTIONS]".color(.green)
|
||||
"[ARGUMENTS]".color(.cyan)
|
||||
"--"
|
||||
"[EXTRA-OPTIONS]".color(.magenta)
|
||||
if usesOptions {
|
||||
"[OPTIONS]".color(.green)
|
||||
}
|
||||
if usesArguments {
|
||||
"[ARGUMENTS]".color(.cyan)
|
||||
}
|
||||
if usesExtraArguments {
|
||||
"--"
|
||||
"[EXTRA-OPTIONS]".color(.magenta)
|
||||
}
|
||||
}
|
||||
|
||||
.eraseToAnyTextNode()
|
||||
|
||||
Reference in New Issue
Block a user