fix(prompter): rename GH_ACCESSIBLE_PROMPTER

This commit is contained in:
Kynan Ware 2025-04-08 12:52:39 -06:00
parent 9cf341302e
commit 19387b8418
3 changed files with 3 additions and 3 deletions

View file

@ -44,7 +44,7 @@ type Prompter interface {
}
func New(editorCmd string, stdin ghPrompter.FileReader, stdout ghPrompter.FileWriter, stderr ghPrompter.FileWriter) Prompter {
accessiblePrompterValue, accessiblePrompterIsSet := os.LookupEnv("GH_SPEECH_SYNTHESIZER_FRIENDLY_PROMPTER")
accessiblePrompterValue, accessiblePrompterIsSet := os.LookupEnv("GH_ACCESSIBLE_PROMPTER")
falseyValues := []string{"false", "0", "no", ""}
if accessiblePrompterIsSet && !slices.Contains(falseyValues, accessiblePrompterValue) {

View file

@ -56,7 +56,7 @@ func TestSpeechSynthesizerFriendlyPrompter(t *testing.T) {
os.Stdout = console.Tty()
os.Stderr = console.Tty()
t.Setenv("GH_SPEECH_SYNTHESIZER_FRIENDLY_PROMPTER", "true")
t.Setenv("GH_ACCESSIBLE_PROMPTER", "true")
// Using echo as the editor command here because it will immediately exit
// and return no input.
p := prompter.New("echo", nil, nil, nil)

View file

@ -109,7 +109,7 @@ var HelpTopics = []helpTopic{
wrapped on the terminal will be taken as the lesser of the terminal width, this value, or 120 if
not specified. This value is used, for example, with %[1]spr view%[1]s subcommand.
%[1]sGH_SPEECH_SYNTHESIZER_FRIENDLY_PROMPTER%[1]s: set to a truthy value to enable prompts that are
%[1]sGH_ACCESSIBLE_PROMPTER%[1]s: set to a truthy value to enable prompts that are
more compatible with speech synthesis based screen readers.
`, "`"),
},