diff --git a/Sources/ArgumentParser/Documentation.docc/Extensions/Argument.md b/Sources/ArgumentParser/Documentation.docc/Extensions/Argument.md index 63162d3f7..7e3678ced 100644 --- a/Sources/ArgumentParser/Documentation.docc/Extensions/Argument.md +++ b/Sources/ArgumentParser/Documentation.docc/Extensions/Argument.md @@ -4,11 +4,20 @@ ### Single Arguments -- ``init(help:completion:)-6pqzn`` -- ``init(help:completion:transform:)`` +- ``init(help:completion:)-6mld0`` - ``init(help:completion:)-4p94d`` -- ``init(wrappedValue:help:completion:)`` -- ``init(wrappedValue:help:completion:transform:)`` +- ``init(help:completion:transform:)-3fjtc`` +- ``init(help:completion:transform:)-7yn32`` + +@Comment { + The following symbols are copied from the preview website, but give a warning + when built and don't show up in this section in the rendered navigation in + either Xcode or the preview website. Instead, these symbols end up in the + default-generated Initializers section. +} + +- ``init(wrappedvalue:help:completion:)`` +- ``init(wrappedvalue:help:completion:transform:)`` ### Array Arguments @@ -20,6 +29,5 @@ ### Infrequently Used APIs -- ``init()`` - ``init(from:)`` - ``wrappedValue`` diff --git a/Sources/ArgumentParser/Documentation.docc/Extensions/ArgumentArrayParsingStrategy.md b/Sources/ArgumentParser/Documentation.docc/Extensions/ArgumentArrayParsingStrategy.md new file mode 100644 index 000000000..e600e6c7d --- /dev/null +++ b/Sources/ArgumentParser/Documentation.docc/Extensions/ArgumentArrayParsingStrategy.md @@ -0,0 +1,14 @@ +# ``ArgumentParser/ArgumentArrayParsingStrategy`` + +## Topics + +### Parsing Strategies + +- ``remaining`` +- ``allUnrecognized`` +- ``postTerminator`` +- ``captureForPassthrough`` + +### Deprecated + +- ``unconditionalRemaining`` diff --git a/Sources/ArgumentParser/Documentation.docc/Extensions/Flag.md b/Sources/ArgumentParser/Documentation.docc/Extensions/Flag.md index f72c7a3b5..cc0f73fdf 100644 --- a/Sources/ArgumentParser/Documentation.docc/Extensions/Flag.md +++ b/Sources/ArgumentParser/Documentation.docc/Extensions/Flag.md @@ -33,7 +33,3 @@ ### Supporting Types - ``FlagExclusivity`` - -### Deprecated APIs - -- ``init()`` diff --git a/Sources/ArgumentParser/Documentation.docc/Extensions/Option.md b/Sources/ArgumentParser/Documentation.docc/Extensions/Option.md index c54466710..a2770a304 100644 --- a/Sources/ArgumentParser/Documentation.docc/Extensions/Option.md +++ b/Sources/ArgumentParser/Documentation.docc/Extensions/Option.md @@ -4,13 +4,28 @@ ### Single Options -- ``init(name:parsing:help:completion:)-4yske`` - ``init(name:parsing:help:completion:)-7slrf`` +- ``init(name:parsing:help:completion:)-5k0ug`` - ``init(name:parsing:help:completion:transform:)-2wf44`` -- ``init(wrappedValue:name:parsing:help:completion:)-7ilku`` +- ``init(name:parsing:help:completion:transform:)-25g7b`` - ``init(wrappedValue:name:parsing:help:completion:transform:)-2llve`` - ``SingleValueParsingStrategy`` +@Comment { + This gives a warning and doesn't show up here, but doesn't show up in the + Initializers section, either. If I omit it here, then it shows up in the + Initializers section. +} + +- ``init(wrappedValue:name:parsing:help:completion:)-7ilku`` + +@Comment { + This gives a warning and doesn't show up here, but is in the Initializers + section. +} + +- ``init(wrappedvalue:name:parsing:help:completion:)-7xcum`` + ### Array Options - ``init(name:parsing:help:completion:)-238hg`` @@ -21,10 +36,17 @@ ### Infrequently Used APIs -- ``init()`` - ``init(from:)`` - ``wrappedValue`` ### Deprecated APIs - ``init(wrappedValue:name:parsing:completion:help:)`` + +@Comment { + These give a warning and don't show up here, but are in the Initializers + section. +} + +- ``init(wrappedvalue:name:parsing:help:completion:)-4pl7h`` +- ``init(wrappedvalue:name:parsing:help:completion:transform:)-6rqji`` diff --git a/Sources/ArgumentParser/Documentation.docc/Extensions/OptionGroup.md b/Sources/ArgumentParser/Documentation.docc/Extensions/OptionGroup.md index 3199b02cf..eebd74d2c 100644 --- a/Sources/ArgumentParser/Documentation.docc/Extensions/OptionGroup.md +++ b/Sources/ArgumentParser/Documentation.docc/Extensions/OptionGroup.md @@ -4,7 +4,11 @@ ### Creating an Option Group -- ``init(visibility:)`` +- ``init(title:visibility:)`` + +### Option Group Properties + +- ``title`` ### Infrequently Used APIs diff --git a/Sources/ArgumentParser/Documentation.docc/Extensions/ParsableArguments.md b/Sources/ArgumentParser/Documentation.docc/Extensions/ParsableArguments.md index bd631fa72..3f697e198 100644 --- a/Sources/ArgumentParser/Documentation.docc/Extensions/ParsableArguments.md +++ b/Sources/ArgumentParser/Documentation.docc/Extensions/ParsableArguments.md @@ -33,3 +33,4 @@ ### Infrequently Used APIs - ``init()`` +- ``helpMessage(columns:)`` diff --git a/Sources/ArgumentParser/Parsable Properties/Argument.swift b/Sources/ArgumentParser/Parsable Properties/Argument.swift index 1899e76ae..ed2961c11 100644 --- a/Sources/ArgumentParser/Parsable Properties/Argument.swift +++ b/Sources/ArgumentParser/Parsable Properties/Argument.swift @@ -460,7 +460,7 @@ extension Argument { Optional @Arguments with default values should be declared as non-Optional. """) public init( - wrappedValue: Optional, + wrappedValue _wrappedValue: Optional, help: ArgumentHelp? = nil, completion: CompletionKind? = nil ) where T: ExpressibleByArgument, Value == Optional { @@ -471,7 +471,7 @@ extension Argument { kind: .positional, help: help, parsingStrategy: .default, - initial: wrappedValue, + initial: _wrappedValue, completion: completion) return ArgumentSet(arg) @@ -541,7 +541,7 @@ extension Argument { Optional @Arguments with default values should be declared as non-Optional. """) public init( - wrappedValue: Optional, + wrappedValue _wrappedValue: Optional, help: ArgumentHelp? = nil, completion: CompletionKind? = nil, transform: @escaping (String) throws -> T @@ -554,7 +554,7 @@ extension Argument { help: help, parsingStrategy: .default, transform: transform, - initial: wrappedValue, + initial: _wrappedValue, completion: completion) return ArgumentSet(arg) diff --git a/Sources/ArgumentParser/Parsable Types/ParsableCommand.swift b/Sources/ArgumentParser/Parsable Types/ParsableCommand.swift index bdf211e0c..a69f268d2 100644 --- a/Sources/ArgumentParser/Parsable Types/ParsableCommand.swift +++ b/Sources/ArgumentParser/Parsable Types/ParsableCommand.swift @@ -82,10 +82,10 @@ extension ParsableCommand { @_disfavoredOverload @available(*, deprecated, renamed: "helpMessage(for:includeHidden:columns:)") public static func helpMessage( - for subcommand: ParsableCommand.Type, + for _subcommand: ParsableCommand.Type, columns: Int? = nil ) -> String { - helpMessage(for: subcommand, includeHidden: false, columns: columns) + helpMessage(for: _subcommand, includeHidden: false, columns: columns) } /// Returns the text of the help screen for the given subcommand of this