From 5e31e12d48299d3f2ece647998a61befc6e9aee6 Mon Sep 17 00:00:00 2001 From: Andrew Chow Date: Mon, 2 Dec 2019 11:21:41 +0200 Subject: [PATCH] 'help' rpc commands autocomplete Adds autocompletion of the commands for when getting the help of a command by using `help ` --- src/qt/rpcconsole.cpp | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git a/src/qt/rpcconsole.cpp b/src/qt/rpcconsole.cpp index ae74ab3..7e6ccd6 100644 --- a/src/qt/rpcconsole.cpp +++ b/src/qt/rpcconsole.cpp @@ -299,9 +299,12 @@ void RPCConsole::setClientModel(ClientModel *model) 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 is initially disabled because running commands is only // possible from now on. ui->lineEdit->setEnabled(true); -- 1.7.1