public function addOption($name, array $options = [])
    {
        if ($name instanceof ConsoleInputOption) {
            $option = $name;
            $name = $option->name();
        } else {
            $defaults = [
                'name' => $name,
                'short' => null,
                'help' => '',
                'default' => null,
                'boolean' => false,
                'choices' => []
            ];
            $options += $defaults;
            $option = new ConsoleInputOption($options);
        }
        $this->_options[$name] = $option;
        asort($this->_options);
        if ($option->short() !== null) {
            $this->_shortOptions[$option->short()] = $name;
            asort($this->_shortOptions);
        }

        return $this;
    }