changeset 27023:c0fd112d374a

'help' rpc commands autocomplete Adds autocompletion of the commands for when getting the help of a command by using `help <command>`
author Andrew Chow <achow101@gmail.com>
date Mon, 09 Jan 2017 20:53:00 -0500
parents 9af19dbdfb4e
children 5758ab65bd71
files src/qt/rpcconsole.cpp
diffstat 1 files changed, 3 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/qt/rpcconsole.cpp	Mon Jan 09 08:39:08 2017 -0800
+++ b/src/qt/rpcconsole.cpp	Mon Jan 09 20:53:00 2017 -0500
@@ -626,9 +626,12 @@
         for (size_t i = 0; i < commandList.size(); ++i)
         {
             wordList << commandList[i].c_str();
+            wordList << ("help " + commandList[i]).c_str();
         }
 
+        wordList.sort();
         autoCompleter = new QCompleter(wordList, this);
+        autoCompleter->setModelSorting(QCompleter::CaseSensitivelySortedModel);
         ui->lineEdit->setCompleter(autoCompleter);
         autoCompleter->popup()->installEventFilter(this);
         // Start thread to execute RPC commands.