apple / apple/swift-argument-parser
Prints help message when I pass a dash symbol even quoted
- Dominant language
- Swift
- Stars
- 3.8k
- Forks
- 411
- Avg merge
- 7d 14h
- Merged PRs (30d)
- 15
Description
It prints a help message when I pass a dash symbol even quoted.
**ArgumentParser version:** `0.4.3`
**Swift version:** Apple Swift version 5.4 (swiftlang-1205.0.26.9 clang-1205.0.19.55) Target: x86_64-apple-darwin20.5.0
### Checklist
- [x] If possible, I've reproduced the issue using the `main` branch of this package
- [x] I've searched for [existing GitHub issues](https://github.com/apple/swift-argument-parser/issues)
### Steps to Reproduce
[Here](https://github.com/griffin-stewie/my_echo) is my sample project to test.
Pass double-quoted string as an argument.
### Expected behavior
`my_echo "- [Apple](https://apple.com)"` → `- [Apple](https://apple.com)`
### Actual behavior
It prints the help message of this command.
Contributor guide
Research direction
Start by reproducing the behavior in the linked my_echo sample project with the quoted Markdown-style argument, then trace how swift-argument-parser handles arguments beginning with a dash. Done means the quoted value is passed through as a literal argument instead of causing the command's help message to print.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- swift
- Domain
- cli
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100