boostorg / boostorg/program_options
The short name is limited to 1 char
- Lingua principale
- C++
- Stelle
- 136
- Fork
- 117
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Descrizione
Version 1.73.0
Documentation (https://www.boost.org/doc/libs/1_73_0/doc/html/boost/program_options/option_description.html#id-1_3_31_9_7_1_1_2_5-bb):
> The 'name' parameter is interpreted by the following rules:
> if there's no "," character in 'name', it specifies long name
> otherwise, the part before "," specifies long name and the part after -- short name.
Code, options_descriptions.cpp, line 205:
```
if (last_name.length() == 1) {
m_short_name = '-' + last_name;
m_long_names.pop_back();
```
This limitation is not mentioned in the docs.
I would prefer that short names of several characters are allowed, but otherwise the limitations should be at least mentioned.
Side note: the possibility of having several long names separated by colons is not mentioned there, either.
Guida per i contributori
Nessuna guida per i contributori indicizzata per questo repository
Direzione di ricerca
Start with options_descriptions.cpp at line 205 and compare its short-name handling with the linked option_description documentation. Check how names containing commas and colons are described, then update the documentation to match the implemented restrictions or clarify the requested behavior. Done means the documented rules accurately cover short names and multiple long names.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- cpp
- Ambito
- cli
- Tipo di issue
- Documentazione
- Difficoltà
- 2/5
- Tempo stimato
- 1-3 ore
- Stato di attività
- Ferma
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 35/100