-
-
Save andrewsomething/47723 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Ubuntu Man Page Search | |
* Andrew Starr-Bochicchio <andrewsomething@ubuntu.com> | |
* MIT/X11 License | |
*/ | |
CmdUtils.CreateCommand({ | |
name: "ubuntu-man", | |
icon: "http://www.ubuntu.com/files/favicon-ubuntu.ico", | |
homepage: "http://manpages.ubuntu.com/", | |
author: { name: "Andrew Starr-Bochicchio", email: "andrewsomething@ubuntu.com"}, | |
license: "MIT", | |
description: "Ubuntu Man Page Search", | |
help: "ubuntu-man [package]", | |
takes: {"package": noun_arb_text}, | |
preview: function(pblock, package, mods) { | |
var template = "Search for ${name} at manpages.ubuntu.com"; | |
pblock.innerHTML = CmdUtils.renderTemplate(template, {"name": package.text}); | |
}, | |
execute: function(package) { | |
var url = "http://manpages.ubuntu.com/manpages/" + package.text; | |
Utils.openUrlInBrowser(url); | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment