Skip to content

Document the option terminator - #935

Open
vivekjm wants to merge 2 commits into
apple:mainfrom
vivekjm:docs-option-terminator
Open

Document the option terminator#935
vivekjm wants to merge 2 commits into
apple:mainfrom
vivekjm:docs-option-terminator

Conversation

@vivekjm

@vivekjm vivekjm commented Jul 28, 2026

Copy link
Copy Markdown

Summary

  • add a new guide for people using command-line tools built with ArgumentParser
  • use the -- option terminator as the guide's first topic, with examples for dash-prefixed and option-like positional values
  • link the guide from the documentation's Essentials section and keep the declaration article focused on defining command interfaces

Fixes #39

Testing

  • git diff --check (passed)
  • swift test --skip CountLinesExampleTests.testCountLines (passed; the skipped fixture is path-sensitive and fails because this checkout path contains spaces)
  • swift package plugin generate-documentation --target ArgumentParser was attempted previously, but this toolchain reported that the plugin subcommand was unavailable

@natecook1000

Copy link
Copy Markdown
Member

Thanks for looking at this, @vivekjm! This isn't the correct spot to document the -- behavior, since that article is about how to declare arguments in your command. We do need an article about using tools built with ArgumentParser. Would you like to take a crack at creating that, with this as the initial section?

@vivekjm

vivekjm commented Aug 22, 2026

Copy link
Copy Markdown
Author

Yes, thanks for the direction. I moved the detailed explanation into a new Using ArgumentParser Tools article, linked it from the documentation’s Essentials section, and restored the declaration article to its brief original note. The new guide starts with the -- behavior and includes both dash-prefixed and option-like positional-value examples.

I also reran the suite with the known path-sensitive CountLines fixture skipped: swift test --skip CountLinesExampleTests.testCountLines passes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Document -- to support all remaining command line args as Arguments

2 participants