Skip to content

Commit f68457d

Browse files
author
Simon Schubert
committed
Fix console search
1 parent ca2e8ab commit f68457d

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

cli/src/main/kotlin/com/linuxcommandlibrary/cli/ConsoleApplication.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ package com.linuxcommandlibrary.cli
33
import com.linuxcommandlibrary.shared.databaseHelper
44
import com.linuxcommandlibrary.shared.getCurrentVersion
55
import com.linuxcommandlibrary.shared.initDatabase
6-
import com.linuxcommandlibrary.shared.search
6+
import com.linuxcommandlibrary.shared.sortedSearch
77
import kotlin.system.exitProcess
88

99
const val BOLD = "\u001b[1m"
@@ -53,7 +53,7 @@ fun showStartMenu() {
5353
fun 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()

0 commit comments

Comments
 (0)