[Program options] changing output format of options_description

Hi! I'm using boost::program_options and my program obtains many parameters. When name or default value of param is long, I get smth like this while trying to cout << desc_obj; fullname-of-important-file, f (=/fold1/fold2/fold3/file.ext) The description if so narrow :( And I wish if it was like this: fullname-of-important-file, f (=/fold1/fold2/fold3/file.ext) The description is here. Such formatting is much more beautiful, IMHO. [empty line?] another-param (=value) Another long long long long description Is there any way to do this? some switcher..

Roman Shmelev wrote:
Hi!
I'm using boost::program_options and my program obtains many parameters. When name or default value of param is long, I get smth like this while trying to
cout << desc_obj;
fullname-of-important-file, f (=/fold1/fold2/fold3/file.ext) The description if so narrow :( And I wish if it was like this:
fullname-of-important-file, f (=/fold1/fold2/fold3/file.ext) The description is here. Such formatting is much more beautiful, IMHO. [empty line?] another-param (=value) Another long long long long description
Is there any way to do this? some switcher..
Roman, unfortunately, this is not possible now. You probably can hack your local copy to unconditionally put a newline before description. - Volodya

unfortunately, this is not possible now. You probably can hack your local copy to unconditionally put a newline before description.
Thank you for response. Of course, hacking the local copy is bad solution.. So, for now I'll try to find out how to make feature request to the author.

Roman Shmelev wrote:
So, for now I'll try to find out how to make feature request to the author.
Oh, it's you, Vladimir :)
Suprise :-)
Do you think this feature is worth implementing? (for example in Boost 1.40)
Boost 1.40 is closed for changes at present. As for 1.41 -- it would be nice feature, but I'm somewhat busy with all other other open-source and non-open-source projects so I cannot promise anything specific. I suggest you file an issue at svn.boost.org so that this is not completely lost. - Volodya

I second this request. I've had need for the same thing. If you create a feature request on the bug tracker, I'll add my vote. Roman Shmelev wrote:
I'm using boost::program_options and my program obtains many parameters. When name or default value of param is long, I get smth like this while trying to
cout << desc_obj;
fullname-of-important-file, f (=/fold1/fold2/fold3/file.ext) The description if so narrow :( And I wish if it was like this:
fullname-of-important-file, f (=/fold1/fold2/fold3/file.ext) The description is here. Such formatting is much more beautiful, IMHO. [empty line?] another-param (=value) Another long long long long description
Is there any way to do this? some switcher..
-- Anthony Foglia Princeton Consultants (609) 987-8787 x233

I've created the ticket: https://svn.boost.org/trac/boost/ticket/3343
participants (3)
-
Anthony Foglia
-
Roman Shmelev
-
Vladimir Prus