mirror of
https://code.dumpstack.io/tools/wi.git
synced 2024-11-26 21:13:02 +00:00
Use duckduckgo as default search engine
This commit is contained in:
parent
2ee8189fde
commit
b95b24b6f4
5
main.go
5
main.go
@ -56,7 +56,7 @@ var (
|
|||||||
historyListItems = historyList.Arg("items", "Amount of items").Int64()
|
historyListItems = historyList.Arg("items", "Amount of items").Int64()
|
||||||
historyListAll = historyList.Flag("all", "Show all items").Bool()
|
historyListAll = historyList.Flag("all", "Show all items").Bool()
|
||||||
|
|
||||||
search = kingpin.Command("search", "Search engine (google by default)")
|
search = kingpin.Command("search", "Search by duckduckgo")
|
||||||
searchArgs = SearchList(search.Arg("string", "String for search"))
|
searchArgs = SearchList(search.Arg("string", "String for search"))
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -103,7 +103,6 @@ func main() {
|
|||||||
case "history":
|
case "history":
|
||||||
commands.History(db, *historyListItems, 20, *historyListAll)
|
commands.History(db, *historyListItems, 20, *historyListAll)
|
||||||
case "search":
|
case "search":
|
||||||
// FIXME: currenlty supports only Google
|
commands.Get(db, jar, "https://duckduckgo.com/html/?q="+strings.Join(*searchArgs, "+"))
|
||||||
commands.Get(db, jar, "https://google.com/search?q="+strings.Join(*searchArgs, "+"))
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user