commandlineparser / commandlineparser/commandline
Multiple long arguments
- 主要語言
- C#
- 星號
- 4.8k
- 分支
- 478
- PR 合併指標
- 30 天內沒有已合併 PR
描述
Oftentimes it is useful to offer multiple long arguments for an option. A common case is a lengthy long argument for which you want to have a shorter version but the 1-char is not possible (e.g. because it's already assigned to other option).
For example, I have an option `DisableResourceWrites` with a long arg `--disableResourceWrites`, for which I would like it to shorten to `--drw` (`-d`, `-r` and `-w` are already taken).
I would like to use it like:
```cs
[Option(new [] { "disableResourceWrite", "drw" }, Required = false, HelpText = "Download resources even if they are already downloaded.")]
```
The help would show up like:
```
--disableResourceWrite, --drw Download resources even if they are already downloaded.
```
The unparsing would just choose the first long arg when short names are not preferred.
貢獻指南
這個儲存庫沒有索引到貢獻指南
研究方向
首先追蹤選項宣告的表示方式、在說明中呈現的方式,以及在 unparsing 期間的處理方式。新增對多個長名稱的支援,使兩個名稱都出現在說明中;當不優先使用短名稱時使用第一個名稱,並確保現有的單一名稱選項繼續正常運作。
由索引模型根據 Issue 內容生成。
評估
- 技術堆疊
- csharp
- 領域
- cli
- Issue 類型
- 功能
- 難度
- 4/5
- 預估耗時
- 3-5 天
- 活躍度
- 停滯
- 描述清晰度
- 基本清楚
- 新手友好度
- 45/100