<commit_before>/**
 * Zeal domain
 *
 * @package Zeal
 * @version 1.0.2
 * @copyright © 2014 anephew, http://github.com/anephew
 * @license http://opensource.org/licenses/MIT The MIT License (MIT)
 *
 */

/*jslint vars: true, plusplus: true, devel: true, nomen: true, indent: 2, maxerr: 50, browser: true */
/*global $, define, require, exports, brackets */


(function () {

  "use strict";

  var child_process = require("child_process");
  
  /**
   * Pass the request to Zeal
   * @param {String} str string
   */
  function cmdZealSearch(str) {
    child_process.exec("zeal --query " + str, function (error, stdout, stderr) {
      console.log('stdout: ' + stdout);
      console.log('stderr: ' + stderr);
      if (error !== null) {
        console.log('exec error: ' + error);
      }
    });
  }

  /**
   * Initialize domain.
   */
  function init(domainManager) {
    
    if (!domainManager.hasDomain("zeal")) {
      domainManager.registerDomain("zeal", {
        major: 0,
        minor: 1
      });
    }
    
    domainManager.registerCommand(
      "zeal", // domain name
      "zealSearch", // command name
      cmdZealSearch, // command handler function
      false, // this command is synchronous in Node
      "Pass the request to Zeal",<commit_msg>fix #4<commit_after>/**
 * Zeal domain
 *
 * @package Zeal
 * @version 1.0.2
 * @copyright © 2014 anephew, http://github.com/anephew
 * @license http://opensource.org/licenses/MIT The MIT License (MIT)
 *
 */

/*jslint vars: true, plusplus: true, devel: true, nomen: true, indent: 2, maxerr: 50, browser: true */
/*global $, define, require, exports, brackets */


(function () {

  "use strict";

  var child_process = require("child_process");
  
  /**
   * Pass the request to Zeal
   * @param {String} str string
   */
  function cmdZealSearch(str) {
    child_process.exec("zeal " + str, function (error, stdout, stderr) {
      if (error !== null) {
        console.log('exec error: ' + error);
      }
    });
  }

  /**
   * Initialize domain.
   */
  function init(domainManager) {
    
    if (!domainManager.hasDomain("zeal")) {
      domainManager.registerDomain("zeal", {
        major: 0,
        minor: 1
      });
    }
    
    domainManager.registerCommand(
      "zeal", // domain name
      "zealSearch", // command name
      cmdZealSearch, // command handler function
      false, // this command is synchronous in Node
      "Pass the request to Zeal",
{'fraction_non_alphanumeric': 0.1476482617586912, 'fraction_numerical': 0.010224948875255624, 'mean_word_length': 2.5604075691411934, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5767665', 'n_tokens_mistral': 809, 'n_tokens_neox': 770, 'n_words': 207}