commandlineparser / commandlineparser/commandline
Use keyword to set positional argument
未关闭
question
- 主要语言
- C#
- 星标
- 4.8k
- 派生
- 478
- PR 合并指标
- 30 天内没有已合并 PR
描述
I don't think this issue has been submitted before, but #56 seems to want the same sort of thing.
I want this syntax to be the normal usage:
app inputfile outputfile
But I want both arguments to be optional and fallback on defaults:
app
Which means that it would be nice to specify one but not the other:
app inputfile
app -t outputfile
Therefore, I'd like to be able to set outputfile via *either* a positional or a keyword argument. Is this supported?
贡献指南
这个仓库没有索引到贡献指南
调研方向
先阅读相关 issue #56 以及命令行参数解析的入口点,以确定当前是否可以通过任一语法提供值。重现 issue 中的三种调用形式,然后确定位置参数和关键字参数是否可以共享同一个目标,以及默认值的行为,再实现或记录结果。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- csharp
- 领域
- cli
- Issue 类型
- 功能
- 难度
- 5/5
- 预计耗时
- 一周以上
- 活跃度
- 停滞
- 描述清晰度
- 基本清楚
- 新手友好度
- 25/100