[lldb] Add description to option completions.
authorRaphael Isemann <teemperor@gmail.com>
Mon, 2 Sep 2019 08:34:57 +0000 (08:34 +0000)
committerRaphael Isemann <teemperor@gmail.com>
Mon, 2 Sep 2019 08:34:57 +0000 (08:34 +0000)
commit6897a814e66f2a2d7e0bec07d7a553b5020123de
tree28ff6bad08d035757fb3c875361f99fe6862cde1
parent453ef4e376a13f5ab8d9e2c6019a57101d8409a4
[lldb] Add description to option completions.

Summary:
Right now our argument completions are rather cryptic for command options as they only list the letters:

```
(lldb) breakpoint set -
Available completions:
-G
-C
-c
-d
-i
-o
-q
-t
-x
[...]
```

With the new completion API we can easily extend this with the flag description so that it looks like this now:

```
(lldb) breakpoint set -
Available completions:
-G -- The breakpoint will auto-continue after running its commands.
-C -- A command to run when the breakpoint is hit, can be provided more than once, the commands will get run in order left to right.
-c -- The breakpoint stops only if this condition expression evaluates to true.
-d -- Disable the breakpoint.
-i -- Set the number of times this breakpoint is skipped before stopping.
-o -- The breakpoint is deleted the first time it stop causes a stop.
-q -- The breakpoint stops only for threads in the queue whose name is given by this argument.
-t -- The breakpoint stops only for the thread whose TID matches this argument.
-x -- The breakpoint stops only for the thread whose index matches this argument.
```

The same happens with --long-options now.

Reviewers: #lldb, labath

Reviewed By: labath

Subscribers: labath, JDevlieghere, lldb-commits

Tags: #lldb

Differential Revision: https://reviews.llvm.org/D67063

llvm-svn: 370628
lldb/packages/Python/lldbsuite/test/functionalities/completion/TestCompletion.py
lldb/source/Interpreter/Options.cpp