From: Andrew Chow Date: Mon, 2 Dec 2019 09:21:41 +0000 (+0200) Subject: 'help' rpc commands autocomplete X-Git-Tag: nvc-v0.5.9~141^2~1 X-Git-Url: https://git.novaco.in/?p=novacoin.git;a=commitdiff_plain;h=5e31e12d48299d3f2ece647998a61befc6e9aee6 'help' rpc commands autocomplete Adds autocompletion of the commands for when getting the help of a command by using `help ` --- 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);