Boost C++ Libraries: Ticket #11393: boost::program_options accepting switch-options that match the beginning of defined option, but is not full option typed out. https://svn.boost.org/trac10/ticket/11393 <p> With: </p> <blockquote> <p> namespace po = boost::program_options; po::options_description desc ("options"); desc.add_options () </p> <blockquote> <p> ( "help,h", "print this help message") ( "config,c", po::value&lt;ustring&gt;(), "config file, default: $XDG_CONFIG_HOME/astroid/config") ( "new-config,n", "make new default config, then exit") ( "mailto,m", po::value&lt;ustring&gt;(), "compose mail with mailto url or address") ( "no-auto-poll", "do not poll automatically"); </p> </blockquote> </blockquote> <blockquote> <p> po::variables_map vm; </p> </blockquote> <blockquote> <p> bool show_help = false; </p> </blockquote> <blockquote> <p> try { </p> <blockquote> <p> po::store ( po::parse_command_line (argc, argv, desc), vm ); </p> </blockquote> <p> } catch (po::unknown_option &amp;ex) { </p> <blockquote> <p> cout &lt;&lt; "unknown option" &lt;&lt; endl; cout &lt;&lt; ex.what() &lt;&lt; endl; show_help = true; </p> </blockquote> </blockquote> <blockquote> <p> } </p> </blockquote> <p> running: </p> <p> ./program --asdf </p> <p> fails, but running: </p> <p> ./program --hel </p> <p> is parsed as --help. </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/11393 Trac 1.4.3