Boost C++ Libraries: Ticket #4644: Do not print empty long program option name https://svn.boost.org/trac10/ticket/4644 <p> This patch partially solves the problem when there is only short option name for the parameter and option_description class generates ugly help message. For example - </p> <p> <code>{{{(",w", po::value&lt;int&gt;(), "Perfrom write with N frames")}}}</code> </p> <p> generates this </p> <p> <code>{{{-w [ -- ] arg : Perfrom write with N frames}}}</code> </p> <p> The "[ -- ]" part is confusing. So if long option name is empty, we don't print that part. </p> <p> Ideally, we should also print one dash for single character long option name if command_line_style::allow_long_disguise is specified, but I can't find a way to access those styles from option_description. </p> <p> Originally, the problem found by a guy at Stack Overflow - <a class="ext-link" href="http://stackoverflow.com/questions/3621181/short-options-only-in-boostprogram-options"><span class="icon">​</span>http://stackoverflow.com/questions/3621181/short-options-only-in-boostprogram-options</a> </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/4644 Trac 1.4.3 vlad@… Sun, 12 Sep 2010 06:42:19 GMT attachment set https://svn.boost.org/trac10/ticket/4644 https://svn.boost.org/trac10/ticket/4644 <ul> <li><strong>attachment</strong> → <span class="trac-field-new">options_description.cpp.diff</span> </li> </ul> <p> Diff for the option_description fix </p> Ticket Vladimir Prus Tue, 28 Sep 2010 09:04:49 GMT status changed; resolution set https://svn.boost.org/trac10/ticket/4644#comment:1 https://svn.boost.org/trac10/ticket/4644#comment:1 <ul> <li><strong>status</strong> <span class="trac-field-old">new</span> → <span class="trac-field-new">closed</span> </li> <li><strong>resolution</strong> → <span class="trac-field-new">fixed</span> </li> </ul> <p> (In <a class="changeset" href="https://svn.boost.org/trac10/changeset/65645" title="Fix formatting of short-only options. Fixes #4644. ">[65645]</a>) Fix formatting of short-only options. </p> <p> Fixes <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/4644" title="#4644: Patches: Do not print empty long program option name (closed: fixed)">#4644</a>. </p> Ticket Vladimir Prus Tue, 28 Sep 2010 09:05:58 GMT <link>https://svn.boost.org/trac10/ticket/4644#comment:2 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/4644#comment:2</guid> <description> <p> Thanks for the patch, I've checked it in. About style and long disguise -- I'm not sure we can do anything, because the parsing style is only know when we actually parse things. </p> </description> <category>Ticket</category> </item> <item> <dc:creator>anonymous</dc:creator> <pubDate>Thu, 01 Mar 2012 12:56:25 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/4644#comment:3 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/4644#comment:3</guid> <description> <p> The patch is not in release 1.49.0!? </p> </description> <category>Ticket</category> </item> <item> <dc:creator>anonymous</dc:creator> <pubDate>Wed, 26 Sep 2012 14:07:48 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/4644#comment:4 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/4644#comment:4</guid> <description> <p> Is there any chance that this feature request will be included into a release. I won't call this a showstopper but still would this make the library more complete from a library user point of view. </p> </description> <category>Ticket</category> </item> <item> <dc:creator>Vladimir Prus</dc:creator> <pubDate>Wed, 26 Sep 2012 15:44:20 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/4644#comment:5 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/4644#comment:5</guid> <description> <p> Ehm, that patch is in the release branch. Since 2012-04-08. So not only it's included in next release, but also in the last one. </p> </description> <category>Ticket</category> </item> </channel> </rss>