boostorg / boostorg/program_options
problem with different quotes
- 主要言語
- C++
- スター
- 136
- フォーク
- 117
- PR マージ指標
- 30日以内にマージされた PR はありません
説明
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)
コントリビューションガイド
このリポジトリのコントリビューションガイドは索引されていません
調査の方向性
まず、issue にあるシングルクォートとダブルクォートが混在するコマンドラインの例を再現し、program_options のコマンドライン分割のエントリーポイントを見つけます。得られた引数ベクターを、リンク先の centreon-collect の実装を参考に、期待される 3 引数の結果と比較します。既存のクォート動作を壊さずに、例が仕様どおりにパースされれば完了です。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- cpp
- 領域
- cli
- issue の種類
- バグ
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 45/100