File tree Expand file tree Collapse file tree
cli/src/main/kotlin/com/linuxcommandlibrary/cli Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ package com.linuxcommandlibrary.cli
33import com.linuxcommandlibrary.shared.databaseHelper
44import com.linuxcommandlibrary.shared.getCurrentVersion
55import com.linuxcommandlibrary.shared.initDatabase
6- import com.linuxcommandlibrary.shared.search
6+ import com.linuxcommandlibrary.shared.sortedSearch
77import kotlin.system.exitProcess
88
99const val BOLD = " \u001b [1m"
@@ -53,7 +53,7 @@ fun showStartMenu() {
5353fun showSearch () {
5454 print (" Search: " )
5555 val input = readlnOrNull() ? : " "
56- val commands = databaseHelper.getCommands().search (input).take(10 )
56+ val commands = databaseHelper.getCommandsByQuery(input).sortedSearch (input).take(10 )
5757 if (commands.isEmpty()) {
5858 println (" No results for \" $input \" " )
5959 showSearch()
You can’t perform that action at this time.
0 commit comments