Skip to content

Commit 6d8fe35

Browse files
committed
'help' rpc commands autocomplete
Adds autocompletion of the commands for when getting the help of a command by using `help <command>`
1 parent 07fd147 commit 6d8fe35

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/qt/rpcconsole.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -626,9 +626,12 @@ void RPCConsole::setClientModel(ClientModel *model)
626626
for (size_t i = 0; i < commandList.size(); ++i)
627627
{
628628
wordList << commandList[i].c_str();
629+
wordList << ("help " + commandList[i]).c_str();
629630
}
630631

632+
wordList.sort();
631633
autoCompleter = new QCompleter(wordList, this);
634+
autoCompleter->setModelSorting(QCompleter::CaseSensitivelySortedModel);
632635
ui->lineEdit->setCompleter(autoCompleter);
633636
autoCompleter->popup()->installEventFilter(this);
634637
// Start thread to execute RPC commands.

0 commit comments

Comments
 (0)