#! /usr/bin/env node
var program = require('commander');
program
  .arguments('<word>')
  .option('-i, --image', 'Search Image on Google')
  .option('-n, --news', 'Search News on Google')

  .action(function(word) {
    var exec = require('child_process').exec;
    var cmd = "open https://google.com/#q=" + word;

    let base = "open \'https://google.com/search?q="
    if (program.image) {
      cmd = base + word + "&tbm=isch\'"
      exec(cmd, function(error, stdout, stderr) {});
    } else if (program.news) {
      cmd = base + word + "&tbm=nws\'"
      exec(cmd, function(error, stdout, stderr) {});
    } else {
      exec(cmd, function(error, stdout, stderr) {});
    }
  })
 .parse(process.argv);

@@ -180,16 +180,67 @@
 Google')
+%0A  .option('-v, --video', 'Search Video on Google')
 %0A%0A  .act
@@ -645,32 +645,156 @@
 t, stderr) %7B%7D);%0A
+    %7D else if (program.video) %7B%0A      cmd = base + word + %22&tbm=vid%5C'%22%0A      exec(cmd, function(error, stdout, stderr) %7B%7D);%0A
     %7D else %7B%0A   

Add video search