[Boost-bugs] [Boost C++ Libraries] #4644: Do not print empty long program option name

Subject: [Boost-bugs] [Boost C++ Libraries] #4644: Do not print empty long program option name
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2010-09-12 06:41:33


#4644: Do not print empty long program option name
-------------------------------+--------------------------------------------
 Reporter: vlad@… | Owner: vladimir_prus
     Type: Patches | Status: new
Milestone: To Be Determined | Component: program_options
  Version: Boost 1.44.0 | Severity: Cosmetic
 Keywords: |
-------------------------------+--------------------------------------------
 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 -

 `{{{(",w", po::value<int>(), "Perfrom write with N frames")}}}`

 generates this

 `{{{-w [ -- ] arg : Perfrom write with N frames}}}`

 The "[ -- ]" part is confusing. So if long option name is empty, we don't
 print that part.

 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.

 Originally, the problem found by a guy at Stack Overflow -
 http://stackoverflow.com/questions/3621181/short-options-only-in-
 boostprogram-options

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/4644>
Boost C++ Libraries <http://www.boost.org/>
Boost provides free peer-reviewed portable C++ source libraries.

This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:04 UTC