docs: function(opt) {
    var strings = (opt.string || "").split(","),
        abbr, full, metavar;
    for (var i = 0; i < strings.length; i++) {
      var string = strings[i].trim(),
          matches;
      if (matches = string.match(/^\-([^-])(?:\s+(.*))?$/)) {
        abbr = matches[1];
        metavar = matches[2];
      }
      else if (matches = string.match(/^\-\-(.+?)(?:[=\s]+(.+))?$/)) {
        full = matches[1];
        metavar = metavar || matches[2];
      }
    }
  
    matches = matches || [];
    var abbr = opt.abbr || abbr,   // e.g. v from -v
        full = opt.full || full, // e.g. verbose from --verbose
        metavar = opt.metavar || metavar;  // e.g. PATH from '--config=PATH'
  
    var string;
    if (opt.string) {
      string = opt.string;
    }
    else if (opt.position === undefined) {
      string = "";
      if (abbr) {
        string += "-" + abbr;
        if (metavar)
          string += " " + metavar
        string += ", ";
      }
      string += "--" + (full || opt.name);
      if (metavar) {
        string += " " + metavar;
      }
    }
  
    opt = _(opt).extend({
      name: opt.name || full || abbr,
      string: string,
      abbr: abbr,
      full: full,
      metavar: metavar,
      matches: function(arg) {
        return opt.full == arg || opt.abbr == arg || opt.position == arg
          || opt.name == arg || (opt.list && arg >= opt.position);
      }
    });
    return opt;
  }