Skip to content

Instantly share code, notes, and snippets.

@qzio
Created September 4, 2009 16:14
Show Gist options
  • Save qzio/180968 to your computer and use it in GitHub Desktop.
Save qzio/180968 to your computer and use it in GitHub Desktop.
CmdUtils.CreateCommand({
names: ["ruby search"],
icon: "http://www.ruby-doc.org/favicon.ico",
description: "search ruby-doc.org using google",
help: "ruby <keyword>.",
author: {name: "joel hansson", email: "joel.hansson'at'gmail.com"},
license: "GPL",
homepage: "http://gottfolk.se",
arguments: [{role: 'object', nountype: noun_arb_text}],
preview: function preview(pblock, args) {
pblock.innerHTML = "Your input is <b>" + args.object.html + "</b>.";
},
execute: function execute(args) {
Utils.openUrlInBrowser('http://google.com/search?q=site:www.ruby-doc.org+'+args.object.text);
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment