Add rudimentary $web_search_provider support

Currently only does single words. Multi-word support coming once
@cmcaine fixes commandline parser.
This commit is contained in:
Oliver Blanthorn 2017-10-06 22:20:19 +01:00
parent 0eceb10bfb
commit 7d27755307
No known key found for this signature in database
GPG key ID: 2BB8C36BB504BFF3
2 changed files with 7 additions and 1 deletions

View file

@ -178,5 +178,11 @@ export function open(url: string) {
messageActiveTab("open", [url])
}
// Hard coded search but lack thereof was annoying
export function google(query: string[]){
let url = "https://www.google.co.uk/search?q=" + query//.join(" ")
messageActiveTab("open", [url])
}
// Misc functions
export function focuscmdline() { messageActiveTab("focuscmdline") }

View file

@ -47,7 +47,7 @@ export namespace normalmode {
["gT", "tabprev"],
["gr", "reader"],
[":", "showcommandline"],
["s", "open google"],
["s", "showcommandline google"],
["xx", "something"],
["i", "insertmode"],
// Special keys must be prepended with 🄰