1
0
mirror of https://github.com/go-task/task.git synced 2025-07-17 01:43:07 +02:00

fix: prompt response should go on same line as message

This commit is contained in:
Pete Davison
2024-05-13 13:38:32 +00:00
committed by Andrey Nering
parent 7535467f45
commit fb3c64c46e

View File

@ -156,7 +156,7 @@ func (l *Logger) Prompt(color Color, prompt string, defaultValue string, continu
return errors.New("no continue values provided") return errors.New("no continue values provided")
} }
l.Outf(color, "%s [%s/%s]\n", prompt, strings.ToLower(continueValues[0]), strings.ToUpper(defaultValue)) l.Outf(color, "%s [%s/%s]: ", prompt, strings.ToLower(continueValues[0]), strings.ToUpper(defaultValue))
reader := bufio.NewReader(l.Stdin) reader := bufio.NewReader(l.Stdin)
input, err := reader.ReadString('\n') input, err := reader.ReadString('\n')