commandlineparser / commandlineparser/commandline

Multiple long arguments

Aberta
#885 0 comentários 0 reações 0 responsáveis Ver no GitHub
Linguagem predominante
C#
Estrelas
4.8k
Forks
478
Métricas de merge de PRs
Nenhum PR com merge em 30d

Descrição

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.

Guia de contribuição

Nenhum guia de contribuição indexado para este repositório

Direção de pesquisa

Start by tracing how option declarations are represented, rendered in help, and handled during unparsing. Add support for multiple long names so both names appear in help, the first is used when short names are not preferred, and existing single-name options continue to work.

Escrita pelo modelo de indexação a partir do texto da issue.

Avaliação

Stack de tecnologia
csharp
Domínio
cli
Tipo de issue
Funcionalidade
Dificuldade
4/5
Tempo estimado
3-5 dias
Status de atividade
Estagnada
Clareza
Razoavelmente clara
Facilidade para iniciantes
45/100

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.