I am using Boost Program Options to parse command line arguments (and I don't want to miss it since it works great). However, I have one problem: Boost program options offer the possibility to assign a description to each option. Boost then offers the possibility to
cout << program_options_description << endl
Jan 22, 2010 - You may receive the following error when using VI within Solaris. Terminal too wide. To resolve this increase the number of columns with the.
to nicely display help explaining the options. However, it seems to be the case that these error messages are adjusted to a terminal width of 80 (I conclude this from the fact that for a width of 80, the line breaks are nicely set).
If my current terminal has another width (in particular one that has less than 80 columns), the displayed help looks very unnatural due to automatic line breaks done by the terminal.
So: Is there a possibility that Boost automatically adjusts the option descriptions to the current terminal width?
phimuemuephimuemue
1 Answer
The options_description accepts the column width as a parameter.
I believe the default is 80 for
m_default_line_length . Also, see this SO question to get the terminal width on linux and then pass that to the constructor. Or if you are windows, you would want to call GetConsoleScreenBufferInfo.
Communityâ¦
Jesse GoodJesse Good
Not the answer you're looking for? Browse other questions tagged c++boost-program-options or ask your own question.Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.
Sign up
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking âSign up for GitHubâ, you agree to our terms of service and privacy statement. Weâll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Commentscommented Oct 27, 2017
bot added the integrated-terminal label Oct 27, 2017commented Oct 27, 2017
commented Oct 27, 2017
commented Oct 27, 2017
bot locked and limited conversation to collaborators Dec 11, 2017
Sign up for freeto subscribe to this conversation on GitHub. Already have an account? Sign in.
Comments are closed.
|
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |