commandlineparser / commandlineparser/commandline

Support + (plus) sign for flags to UNSET a flag often used by Linux

オープン
#833 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る
主要言語
C#
スター
4.8k
フォーク
478
PR マージ指標
30日以内にマージされた PR はありません

説明

>All of the single letter options that have a corresponding name can be used as an argument to the -o option. The set -o name is provided next to the single letter option in the description below. Specifying a dash “-” turns the option on, while using a plus “+” disables the option.

Meaning, assume you have the following option:

[Option('x', "XXXX", Required = false, Default = true)]
public bool X { get; set; }

And you would pass `+x`, then the result should be `False`:

app.exe +x

This seems like a better approach then a nullable bool:

[Option('x', "XXXX", Required = false, Default = true)]
public bool? X { get; set; }

As that requires to pass:

app.exe -x false

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

調査の方向性

コマンドラインオプション解析のエントリポイントで、既存の1文字フラグの処理と、オプションのプレフィックスを対象とするテストを探します。デフォルト値が true として宣言されたオプションが +x として呼び出されたときに false になることを確認し、文書化されている -x の動作を維持します。要求された構文をカバーするテストを追加します。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
csharp
領域
cli
issue の種類
機能追加
難易度
3/5
見積もり時間
1〜2日
活発さ
停滞
明瞭さ
おおむね明確
初心者へのやさしさ
45/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。