boostorg / boostorg/program_options
problem with different quotes
- Lingua principale
- C++
- Stelle
- 136
- Fork
- 117
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Descrizione
boost 1.87
alma9
When you mix " and ' in a command line unix command line, unix parser and perhaps windows one doesn't take into account the first type of quote.
An example:
with this command line: /bin/sh -c '/bin/echo "ResourceFile AdminPager: " >> /tmp/notif_toto.txt'
It split in
std::vector of length 5, capacity 8 = {"/bin/sh", "-c", "/bin/echo ResourceFile", "AdminPager:", " >> /tmp/notif_toto.txt"}
It should split in:
std::vector of length 3, capacity 8 = {"/bin/sh", "-c", "/bin/echo "ResourceFile AdminPager:" >> /tmp/notif_toto.txt"}
An example of implementation: [centreon collect](https://github.com/centreon/centreon-collect/blob/4fc9ec16970fa0390aa2e185040ad47cfd0a852c/clib/src/misc/command_line.cc#L136)
Guida per i contributori
Nessuna guida per i contributori indicizzata per questo repository
Direzione di ricerca
Start by reproducing the mixed single- and double-quote command-line example from the issue and locate the program_options command-line splitting entry point. Compare the resulting argument vector with the expected three-argument result, using the linked centreon-collect implementation as a reference; done means the example parses as specified without breaking existing quoting behavior.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- cpp
- Ambito
- cli
- Tipo di issue
- Bug
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Stato di attività
- Ferma
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 45/100