commandlineparser / commandlineparser/commandline

Allow no value

未关闭
#674 2 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
主要语言
C#
星标
4.8k
派生
478
PR 合并指标
30 天内没有已合并 PR

描述

I'm trying to implement a string option that can have three states:
1. Not supplied
2. No value
3. Empty or value

I want to do the following:
`MyApp.exe` writes unformatted output to standard output
`MyApp.exe --json` writes JSON formatted output to standard output
`MyApp.exe --json file.json` writes JSON formatted output to `file.json`

Is this currently possible?

贡献指南

这个仓库没有索引到贡献指南

调研方向

该 issue 未提及任何文件或测试。首先检查命令行选项解析的入口点,以及某个选项是否能够区分未提供、提供了但没有值、值为空或提供了显式值这几种情况。验证 issue 中的三种命令形式,并为每种预期输出和目标定义测试。

由索引模型根据 Issue 内容生成。

评估

技术栈
csharp
领域
cli
Issue 类型
功能
难度
5/5
预计耗时
一周以上
活跃度
停滞
描述清晰度
基本清楚
新手友好度
25/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。