swift-argument-parser
swift-argument-parser copied to clipboard
Straightforward, type-safe argument parsing for Swift
Solution to the issue #462. This PR is used to track progress and view differences to make discussions easier. ### Checklist - [x] I've added at least one test that...
Declaring an argument with `@Argument(..., transform:)` makes it non-optional in the "USAGE" and doesn't include it's default value in the argument's abstract in the "ARGUMENTS" section, ***even* if the value...
Xcode 13.1 on macOS 11.6.7 throws the compiler error "Concurrency is only available in macOS 12.0.0 or newer" since `AsyncParsableCommand` and `AsyncMainProtocol` are only marked with `@available(macOS 10.15)`. This should...
# Introduction ArgumentParser provides a straightforward way to declare command-line interfaces in Swift, with the dual goals of making it (1) fast and easy to create (2) high-quality, user-friendly CLI...
Building in release mode produces this since #410 was merged: ``` > ./swift-5.6.2-RELEASE-ubuntu20.04/usr/bin/swift build -c release /home/butta/swift-argument-parser/Sources/ArgumentParserTestHelpers/TestHelpers.swift:12:18: error: module 'ArgumentParser' was not compiled for testing @testable import ArgumentParser ``` That...
There should be API added to the `CommandConfiguration` type so that command authors can disable interactive mode. We'll need to choose a good name — something like `promptForMissingRequiredValues: Bool =...
Tests are currently blocked on the `feature/interactive` branch because the interactive mode is always on. It should only run when the command is executed in an interactive shell.
The following internal functions will serve as the basis for the interactive mode: ### `Ask` prompt the user for input: ```swift let operand = ask("Please enter operand:", type: Int.self) ```...
**ArgumentParser version:** `1.1.2`. **Swift version:** ``` swift-driver version: 1.45.2 Apple Swift version 5.6.1 (swiftlang-5.6.0.323.66 clang-1316.0.20.12) Target: arm64-apple-macosx12.0 ``` ### Checklist - [ ] If possible, I've reproduced the issue using...
Replace this paragraph with a short description of the incorrect incorrect behavior. If this is a regression, please note the last version that the behavior was correct in addition to...