summaryrefslogtreecommitdiff
path: root/src/cam/options.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/cam/options.cpp')
-rw-r--r--src/cam/options.cpp12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/cam/options.cpp b/src/cam/options.cpp
index 55c42540..83601270 100644
--- a/src/cam/options.cpp
+++ b/src/cam/options.cpp
@@ -153,7 +153,17 @@ void OptionsParser::usage()
}
std::cerr << std::setw(indent) << std::left << argument;
- std::cerr << option.help << std::endl;
+
+ for (const char *help = option.help, *end = help; end; ) {
+ end = strchr(help, '\n');
+ if (end) {
+ std::cerr << std::string(help, end - help + 1);
+ std::cerr << std::setw(indent) << " ";
+ help = end + 1;
+ } else {
+ std::cerr << help << std::endl;
+ }
+ }
}
}