File tree Expand file tree Collapse file tree 1 file changed +10
-2
lines changed
Sources/ArgumentParser/Parsable Properties Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -188,8 +188,8 @@ public struct ArgumentArrayParsingStrategy: Hashable {
188188 self . init ( base: . allUnrecognized)
189189 }
190190
191- /// Before parsing, capture all inputs that follow the `--` terminator in this
192- /// argument array.
191+ /// Before parsing arguments , capture all inputs that follow the `--`
192+ /// terminator in this argument array.
193193 ///
194194 /// For example, the `Example` command defined below has a `words` array that
195195 /// uses the `postTerminator` parsing strategy:
@@ -219,6 +219,14 @@ public struct ArgumentArrayParsingStrategy: Hashable {
219219 /// Error: Unexpected argument 'Extra'
220220 /// ```
221221 ///
222+ /// Because options are parsed before arguments, an option that consumes or
223+ /// suppresses the `--` terminator can prevent a `postTerminator` argument
224+ /// array from capturing any input. In particular, the
225+ /// ``SingleValueParsingStrategy/unconditional``,
226+ /// ``ArrayParsingStrategy/unconditionalSingleValue``, and
227+ /// ``ArrayParsingStrategy/remaining`` parsing strategies can all consume
228+ /// the terminator as part of their values.
229+ ///
222230 /// - Note: This parsing strategy can be surprising for users, since it
223231 /// changes the behavior of the `--` terminator. Prefer ``remaining``
224232 /// whenever possible.
You can’t perform that action at this time.
0 commit comments