text: var common = require('../common');
  
  module.exports = rule;
  
  function rule(subcmd, opts, args, cb) {
      var self = this;
  
      var finish = common.makeFinisher(opts, cb);
  
      if (opts.help) {
          self.do_help('help', {}, [subcmd], cb);
          return;
      }
  
      var id = parseInt(args.shift(), 10);
  
      if (isNaN(id)) {
          cb(new Error('`id` argument must be a number'));
          return;
      }
  
      self.client.rule(id, finish);
  }
  
  rule.options = [
      {
          names: ['help', 'h'],
          type: 'bool',
          help: 'Show this help.'
      },
      {
          names: ['json', 'j'],
          type: 'bool',
          help: 'JSON output.'
      }
  ];
  rule.help = 'Show a rule\n\n{{options}}';
  