<feed xmlns='http://www.w3.org/2005/Atom'>
<title>ydb/library/cpp/getopt/small/last_getopt_parse_result.cpp, branch CLI_2.30.0</title>
<subtitle>Mirror of YDB github repos</subtitle>
<id>https://code.mastervirt.ru/ydb/atom?h=CLI_2.30.0</id>
<link rel='self' href='https://code.mastervirt.ru/ydb/atom?h=CLI_2.30.0'/>
<link rel='alternate' type='text/html' href='https://code.mastervirt.ru/ydb/'/>
<updated>2025-12-23T16:19:02Z</updated>
<entry>
<title>Introduce tags for free args in opt-parser</title>
<updated>2025-12-23T16:19:02Z</updated>
<author>
<name>ilikepugs</name>
<email>ilikepugs@yandex-team.com</email>
</author>
<published>2025-12-23T15:56:01Z</published>
<link rel='alternate' type='text/html' href='https://code.mastervirt.ru/ydb/commit/?id=9d66ab24e3973f879cae08d109a8bfadadcd1d43'/>
<id>urn:sha1:9d66ab24e3973f879cae08d109a8bfadadcd1d43</id>
<content type='text'>
### Что случилось?

- Появилась возможность размечать свободные аргументы тегами (хранятся как ui32-значения)
- Теги могут быть статические (`.SetTag(ESomeTags::Tag1)`) и динамические (`.SetTag([] (const TString&amp; a) {return a ? ESomeTags::Tag1 : ESomeTags::Tag2; })`).
- После парсинга можно получить свободные аргументы с определенным тегом (`res.GetFreeArgs(ESomeTags::Tag1)`)
commit_hash:c1a9d821da376538eb7e4251626052a9f03b941c
</content>
</entry>
<entry>
<title>Collect subcommand parts in getopt</title>
<updated>2025-11-26T06:52:47Z</updated>
<author>
<name>ilikepugs</name>
<email>ilikepugs@yandex-team.com</email>
</author>
<published>2025-11-26T06:37:33Z</published>
<link rel='alternate' type='text/html' href='https://code.mastervirt.ru/ydb/commit/?id=3344ce008b1318a27b236192ceb4fb5567ba926e'/>
<id>urn:sha1:3344ce008b1318a27b236192ceb4fb5567ba926e</id>
<content type='text'>
#### Проблема

Из TOptsParseResult сейчас невозможно понять, какую команду вызвали.

Существует метод [GetProgrammName](https://nda.ya.ru/t/SdJXhPQC7NczPm, который частично решает эту задачу, однако:

1. Его поведение зависит от флага [PrintShortCommandInUsage](https://nda.ya.ru/t/3sh6_wPV7NczPt Выставление флага меняет вывод `help`
2. Даже с флагом метод отдает одну строку вместе с запускаемым бинарем. Если хочется отделить только submod'ы, то эту строку приходится сплитить.

#### Решение

Добавил всюду где нужно InvocationParts, которые заполняются по ходу парсинга входных аргументов. В конечном итоге эти parts передаются в TOptsParseResult, откуда могут быть получены вызывающей стороной.
commit_hash:4cf72141552793b19a725b3d394b81215508b85f
</content>
</entry>
<entry>
<title>[getopt] Add typo check for long options</title>
<updated>2022-09-01T17:05:05Z</updated>
<author>
<name>lightqwant</name>
<email>lightqwant@yandex-team.com</email>
</author>
<published>2022-09-01T17:05:05Z</published>
<link rel='alternate' type='text/html' href='https://code.mastervirt.ru/ydb/commit/?id=7cfd122cb661b485fb0fb4139573a0beac97ae48'/>
<id>urn:sha1:7cfd122cb661b485fb0fb4139573a0beac97ae48</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Restoring authorship annotation for &lt;amatanhead@yandex-team.ru&gt;. Commit 2 of 2.</title>
<updated>2022-02-10T13:50:04Z</updated>
<author>
<name>amatanhead</name>
<email>amatanhead@yandex-team.ru</email>
</author>
<published>2022-02-10T13:50:04Z</published>
<link rel='alternate' type='text/html' href='https://code.mastervirt.ru/ydb/commit/?id=b6f3a80f7c2c8b7dbb0c01b056fdc1fd8cd820e9'/>
<id>urn:sha1:b6f3a80f7c2c8b7dbb0c01b056fdc1fd8cd820e9</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Restoring authorship annotation for &lt;amatanhead@yandex-team.ru&gt;. Commit 1 of 2.</title>
<updated>2022-02-10T13:50:04Z</updated>
<author>
<name>amatanhead</name>
<email>amatanhead@yandex-team.ru</email>
</author>
<published>2022-02-10T13:50:04Z</published>
<link rel='alternate' type='text/html' href='https://code.mastervirt.ru/ydb/commit/?id=8879605a63ac17539be5b3bd41b529791f4d4b02'/>
<id>urn:sha1:8879605a63ac17539be5b3bd41b529791f4d4b02</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Restoring authorship annotation for &lt;yuraaka@yandex-team.ru&gt;. Commit 2 of 2.</title>
<updated>2022-02-10T13:47:05Z</updated>
<author>
<name>yuraaka</name>
<email>yuraaka@yandex-team.ru</email>
</author>
<published>2022-02-10T13:47:05Z</published>
<link rel='alternate' type='text/html' href='https://code.mastervirt.ru/ydb/commit/?id=5577dc406121f6fb3f45b227c01f4251880193a1'/>
<id>urn:sha1:5577dc406121f6fb3f45b227c01f4251880193a1</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Restoring authorship annotation for &lt;yuraaka@yandex-team.ru&gt;. Commit 1 of 2.</title>
<updated>2022-02-10T13:47:05Z</updated>
<author>
<name>yuraaka</name>
<email>yuraaka@yandex-team.ru</email>
</author>
<published>2022-02-10T13:47:05Z</published>
<link rel='alternate' type='text/html' href='https://code.mastervirt.ru/ydb/commit/?id=4230543261d7a38ef4dc14785ae0d45f2da43704'/>
<id>urn:sha1:4230543261d7a38ef4dc14785ae0d45f2da43704</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Restoring authorship annotation for Ilnur Khuziev &lt;ilnur.khuziev@yandex.ru&gt;. Commit 2 of 2.</title>
<updated>2022-02-10T13:46:14Z</updated>
<author>
<name>Ilnur Khuziev</name>
<email>ilnur.khuziev@yandex.ru</email>
</author>
<published>2022-02-10T13:46:14Z</published>
<link rel='alternate' type='text/html' href='https://code.mastervirt.ru/ydb/commit/?id=60040c91ffe701a84689b2c6310ff845e65cff42'/>
<id>urn:sha1:60040c91ffe701a84689b2c6310ff845e65cff42</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Restoring authorship annotation for Ilnur Khuziev &lt;ilnur.khuziev@yandex.ru&gt;. Commit 1 of 2.</title>
<updated>2022-02-10T13:46:13Z</updated>
<author>
<name>Ilnur Khuziev</name>
<email>ilnur.khuziev@yandex.ru</email>
</author>
<published>2022-02-10T13:46:13Z</published>
<link rel='alternate' type='text/html' href='https://code.mastervirt.ru/ydb/commit/?id=736dcd8ca259457a136f2f9f9168c44643914323'/>
<id>urn:sha1:736dcd8ca259457a136f2f9f9168c44643914323</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Restoring authorship annotation for Anton Samokhvalov &lt;pg83@yandex.ru&gt;. Commit 2 of 2.</title>
<updated>2022-02-10T13:45:17Z</updated>
<author>
<name>Anton Samokhvalov</name>
<email>pg83@yandex.ru</email>
</author>
<published>2022-02-10T13:45:17Z</published>
<link rel='alternate' type='text/html' href='https://code.mastervirt.ru/ydb/commit/?id=d3a398281c6fd1d3672036cb2d63f842d2cb28c5'/>
<id>urn:sha1:d3a398281c6fd1d3672036cb2d63f842d2cb28c5</id>
<content type='text'>
</content>
</entry>
</feed>
