public function help($subcommand = null, $format = 'text', $width = 72)
    {
        if ($subcommand === null) {
            $formatter = new HelpFormatter($this);
            $formatter->setAlias($this->rootName);

            if ($format === 'text') {
                return $formatter->text($width);
            }
            if ($format === 'xml') {
                return (string)$formatter->xml();
            }
        }

        if (isset($this->_subcommands[$subcommand])) {
            $command = $this->_subcommands[$subcommand];
            $subparser = $command->parser();

            // Generate a parser as the subcommand didn't define one.
            if (!($subparser instanceof self)) {
                // $subparser = clone $this;
                $subparser = new self($subcommand);
                $subparser
                    ->setDescription($command->getRawHelp())
                    ->addOptions($this->options())
                    ->addArguments($this->arguments());
            }
            if (strlen($subparser->getDescription()) === 0) {
                $subparser->setDescription($command->getRawHelp());
            }
            $subparser->setCommand($this->getCommand() . ' ' . $subcommand);
            $subparser->setRootName($this->rootName);

            return $subparser->help(null, $format, $width);
        }

        return $this->getCommandError($subcommand);
    }