public static function select($prompt, $options = [])
    {
        $helpText = '';
        foreach ($options as $key => $value) {
            $helpText .= " $key - $value\n";
        }
        $helpText .= ' ? - Show help';
        $promptText = "$prompt [" . implode(',', array_keys($options)) . ',?]: ';
        $promptOptions = [
            'required' => true,
            'validator' => function($input, &$error) use($options, $helpText) {
                $input = trim($input);
                if ($input === '?') {
                    $error = $helpText;
                    return false;
                }
                if (array_key_exists($input, $options)) {
                    return true;
                }

                $error = "Invalid input, please enter '?' for help";
                return false;
            }
        ];
        return static::prompt($promptText, $promptOptions);
    }