From 2e24e19cacacd4eea346b914124ffc3acadbd72e Mon Sep 17 00:00:00 2001 From: Alexander Kornienko Date: Fri, 10 May 2013 17:15:51 +0000 Subject: Better output for long help strings for command-line options. Summary: This patch allows using \n inside long help strings for command-line options, so that all lines are equally indented. This is not a perfect solution, as we don't (and probably don't want to) know about terminal width, but it allows to format long help strings somehow readable without manually padding them with spaces. A motivating example is -help output from clang-format (source code in tools/clang-format/ClangFormat.cpp, see cl options offset, length, style, and dump-config). Reviewers: atrick, alexfh Reviewed By: alexfh CC: llvm-commits, rafael Differential Revision: http://llvm-reviews.chandlerc.com/D779 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@181608 91177308-0d34-0410-b5e6-96231b3b80d8 --- docs/CommandLine.rst | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'docs') diff --git a/docs/CommandLine.rst b/docs/CommandLine.rst index 9b77a98..6535551 100644 --- a/docs/CommandLine.rst +++ b/docs/CommandLine.rst @@ -930,7 +930,8 @@ This section describes the basic attributes that you can specify on options. .. _cl::desc(...): * The **cl::desc** attribute specifies a description for the option to be - shown in the ``-help`` output for the program. + shown in the ``-help`` output for the program. This attribute supports + multi-line descriptions with lines separated by '\n'. .. _cl::value_desc: -- cgit v1.1