diff options
author | Enrico Granata <egranata@apple.com> | 2014-09-15 17:52:44 +0000 |
---|---|---|
committer | Enrico Granata <egranata@apple.com> | 2014-09-15 17:52:44 +0000 |
commit | 735152e3b0f2ddb37f1c540a74a4b4f007225cb6 (patch) | |
tree | e28d8a29d99d1a4308f428c707661ec79660507e /lldb/source/Interpreter/CommandObject.cpp | |
parent | 9a78334b969d662855bcfd52303db794c7dd7c8b (diff) | |
download | bcm5719-llvm-735152e3b0f2ddb37f1c540a74a4b4f007225cb6.tar.gz bcm5719-llvm-735152e3b0f2ddb37f1c540a74a4b4f007225cb6.zip |
Add a --help (-h) option to "command script add" that enables users to define a one-liner short help for their command
Also, in case they don't define any, change the default from "Run Python function <blah>" into "For more information run help <blah>"
The core issue here is that Python only allows one docstring per function, so we can't really attach both a short and a long help to the same command easily
There are alternatives but this is not a pressing enough concern to go through the motions quite yet
Fixes rdar://18322737
llvm-svn: 217795
Diffstat (limited to 'lldb/source/Interpreter/CommandObject.cpp')
-rw-r--r-- | lldb/source/Interpreter/CommandObject.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/lldb/source/Interpreter/CommandObject.cpp b/lldb/source/Interpreter/CommandObject.cpp index 3fdbf994fe7..d8eade836ba 100644 --- a/lldb/source/Interpreter/CommandObject.cpp +++ b/lldb/source/Interpreter/CommandObject.cpp @@ -1103,6 +1103,7 @@ CommandObject::g_arguments_data[] = { eArgTypeFunctionName, "function-name", CommandCompletions::eNoCompletion, { nullptr, false }, "The name of a function." }, { eArgTypeFunctionOrSymbol, "function-or-symbol", CommandCompletions::eNoCompletion, { nullptr, false }, "The name of a function or symbol." }, { eArgTypeGDBFormat, "gdb-format", CommandCompletions::eNoCompletion, { GDBFormatHelpTextCallback, true }, nullptr }, + { eArgTypeHelpText, "help-text", CommandCompletions::eNoCompletion, { nullptr, false }, "Text to be used as help for some other entity in LLDB" }, { eArgTypeIndex, "index", CommandCompletions::eNoCompletion, { nullptr, false }, "An index into a list." }, { eArgTypeLanguage, "language", CommandCompletions::eNoCompletion, { LanguageTypeHelpTextCallback, true }, nullptr }, { eArgTypeLineNum, "linenum", CommandCompletions::eNoCompletion, { nullptr, false }, "Line number in a source file." }, |