Transform the value of an argument
Open
- Dominant language
- Kotlin
- Stars
- 951
- Forks
- 71
- PR merge metrics
- No merged PRs in 30d
Description
Hello,
Is there a way to transform the value of an argument like:
```kotlin
val parser = ArgParser(args)
val file: File by parser.option(ArgType.String, transform = { File(it) })
```
instead of
```kotlin
val parser = ArgParser(args)
val filename: String by parser.option(ArgType.String)
val file: File = File(filename)
```
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by tracing the ArgParser.option API, including ArgType.String and its existing argument conversion behavior. Done means the shown transform lambda can produce a File value directly from the option and the behavior is covered by tests.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- kotlin
- Domain
- cli
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100