public static function getOption( Command $command, $longCode )
    {
        foreach ( $command->options as $op )
        {
            if ( '--' === substr( $longCode, 0, 2 ) )
            {
                $longCode = substr( $longCode, 2 );
            }
            elseif ( '-' === substr( $longCode, 0, 1 ) )
            {
                $longCode = substr( $longCode, 1 );
            }

            if ( $op->shortCode === $longCode || $op->longCode === $longCode )
            {
                return $op;
            }
        }

        throw new CommandException( 'Unable to find option: ' . $longCode );
    }