diff options
author | Enrico Granata <egranata@apple.com> | 2016-03-14 22:17:04 +0000 |
---|---|---|
committer | Enrico Granata <egranata@apple.com> | 2016-03-14 22:17:04 +0000 |
commit | bef55ac8f54fc62369af35483ab69f8d0676050d (patch) | |
tree | d24412b18a03908157a952f88e036903cb5db705 /lldb/source/Interpreter/CommandObject.cpp | |
parent | 2414c5d46be6de849cdba1b048f3e7096cb578f1 (diff) | |
download | llvm-bef55ac8f54fc62369af35483ab69f8d0676050d.zip llvm-bef55ac8f54fc62369af35483ab69f8d0676050d.tar.gz llvm-bef55ac8f54fc62369af35483ab69f8d0676050d.tar.bz2 |
Lots of progress on the CommandAlias refactoring
This cleans things up such CommandAlias essentially can work as its own object; the aliases still live in a separate map, but are now just full-fledged CommandObjectSPs
This patch also cleans up help generation for aliases, allows aliases to vend their own help, and adds a tweak such that "dash-dash aliases", such as po, don't show the list of options for their underlying command, since those can't be provided anyway
I plan to fix up a few more things here, and then add a test case and proclaim victory
llvm-svn: 263499
Diffstat (limited to 'lldb/source/Interpreter/CommandObject.cpp')
-rw-r--r-- | lldb/source/Interpreter/CommandObject.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lldb/source/Interpreter/CommandObject.cpp b/lldb/source/Interpreter/CommandObject.cpp index 0993cd3..ead292a 100644 --- a/lldb/source/Interpreter/CommandObject.cpp +++ b/lldb/source/Interpreter/CommandObject.cpp @@ -88,12 +88,12 @@ CommandObject::GetSyntax () { StreamString syntax_str; syntax_str.Printf ("%s", GetCommandName()); - if (GetOptions() != nullptr) + if (!IsDashDashCommand() && GetOptions() != nullptr) syntax_str.Printf (" <cmd-options>"); if (m_arguments.size() > 0) { syntax_str.Printf (" "); - if (WantsRawCommandString() && GetOptions() && GetOptions()->NumCommandOptions()) + if (!IsDashDashCommand() && WantsRawCommandString() && GetOptions() && GetOptions()->NumCommandOptions()) syntax_str.Printf("-- "); GetFormattedCommandArguments (syntax_str); } |