Skip to content

Instantly share code, notes, and snippets.

@andrewsomething
Created January 17, 2009 22:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save andrewsomething/48475 to your computer and use it in GitHub Desktop.
Save andrewsomething/48475 to your computer and use it in GitHub Desktop.
/* AptURL
* Andrew Starr-Bochicchio <andrewsomething@ubuntu.com>
* MIT/X11 License
*/
CmdUtils.CreateCommand({
name: "apturl",
icon: "http://www.ubuntu.com/files/favicon-ubuntu.ico",
/* homepage: "http://packages.qa.debian.org/common/index.html", */
author: { name: "Andrew Starr-Bochicchio", email: "andrewsomething@ubuntu.com"},
license: "MIT",
description: "Install Ubuntu packages with AptURL.",
help: "apturl [package]",
takes: {"package": noun_arb_text},
preview: function(pblock, package) {
var template = "Install ${name} on Ubuntu";
pblock.innerHTML = CmdUtils.renderTemplate(template, {"name": package.text});
},
execute: function(package) {
var url = "apt:" + package.text;
Utils.openUrlInBrowser(url);
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment