def opts name, &b
    fail "command name must be a symbol" unless name.is_a? Symbol

    if name.to_s =~ /[A-Z]/
      fail "Camel-casing is not allowed (#{name})"
    end

    parser = OptionParser.new name.to_s, @ns.shell.fs, &b
    summary = parser.summary?

    parser.specs.each do |opt_name,spec|
      if opt_name.to_s =~ /[A-Z]/
        fail "Camel-casing is not allowed (#{name} option #{opt_name})"
      end
    end

    @ns.commands[name] = Command.new @ns, name, summary, parser
  end
def opts name, &b
    fail "command name must be a symbol" unless name.is_a? Symbol

    if name.to_s =~ /[A-Z]/
      fail "Camel-casing is not allowed (#{name})"
    end

    parser = OptionParser.new name.to_s, @ns.shell.fs, &b
    summary = parser.summary?

    parser.specs.each do |opt_name,spec|
      if opt_name.to_s =~ /[A-Z]/
        fail "Camel-casing is not allowed (#{name} option #{opt_name})"
      end
    end

    @ns.commands[name] = Command.new @ns, name, summary, parser
  end
Command definition functions