<commit_before>var CommandManager = require('../command-manager');

CommandManager.register('alias', alias);

function alias(args, stdin, stdout, stderr) {
  if (args.arguments.length) {
    var key = args.arguments.shift();
    var index;
    if (~(index = key.indexOf('='))) {
      var command;

      if (args.arguments.length && index === key.length - 1) {
        command = args.arguments.join(' ');
      } else {
        command = key.substr(index+1);
      }

      key = key.substr(0, index);

      if (command) {
        CommandManager.alias(key, command);
      }
    }
  }

  stdout('');
}<commit_msg>Updated alias command to show defined aliases if called with no arguments<commit_after>var CommandManager = require('../command-manager');

CommandManager.register('alias', alias);

function alias(args, stdin, stdout, stderr) {
  var buffer = '';
  if (args.arguments.length) {
    var key = args.arguments.shift();
    var index;
    if (~(index = key.indexOf('='))) {
      var command;

      if (args.arguments.length && index === key.length - 1) {
        command = args.arguments.join(' ');
      } else {
        command = key.substr(index+1);
      }

      key = key.substr(0, index);

      if (command) {
        CommandManager.alias(key, command);
      }
    }
  } else {
    var aliases = CommandManager.alias();

    for (var i in aliases) {
      buffer += i + "='" + aliases[i] + "'"
    }
  }

  stdout(buffer);
}
{'fraction_non_alphanumeric': 0.16251728907330568, 'fraction_numerical': 0.004149377593360996, 'mean_word_length': 2.5206812652068127, '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': '5910832', 'n_tokens_mistral': 463, 'n_tokens_neox': 446, 'n_words': 105}