Skip to content

Commit

Permalink
update ANSI colored output to be more readable
Browse files Browse the repository at this point in the history
  • Loading branch information
ptgoetz committed Sep 15, 2024
1 parent 46507e8 commit 6019c70
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions internal/versionbump.go
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ func (vb *VersionBump) Show(versionStr string) error {
padding,
patchVersion.String())

printColorOpts(vb.Options, tree, ColorBlue)
printColorOpts(vb.Options, tree, ColorLightBlue)
return nil
}

Expand All @@ -137,7 +137,7 @@ func (vb *VersionBump) ShowEffectiveConfig() error {
if err != nil {
return err
}
printColorOpts(vb.Options, string(b), ColorBlue)
printColorOpts(vb.Options, string(b), ColorLightBlue)
return nil
}

Expand Down Expand Up @@ -418,7 +418,7 @@ func promptUserConfirmation(prompt string) bool {

for {
// Print the prompt and read the user's input
printColor(fmt.Sprintf("%s [y/N]: ", prompt), ColorBlue)
printColor(fmt.Sprintf("%s [y/N]: ", prompt), ColorLightBlue)
input, err := reader.ReadString('\n')
if err != nil {
printColor("Error reading input. Please try again.", ColorYellow)
Expand Down Expand Up @@ -463,6 +463,7 @@ const (
ColorGreen = "green"
ColorYellow = "yellow"
ColorBlue = "blue"
ColorLightBlue = "light-blue"
ColorMagenta = "magenta"
ColorCyan = "cyan"
ColorWhite = "white"
Expand All @@ -484,6 +485,8 @@ func printColor(text string, color string) {
colorCode = "\033[33m"
case ColorBlue:
colorCode = "\033[34m"
case ColorLightBlue:
colorCode = "\033[38;5;117m" // Light blue using extended 256 color code
case ColorMagenta:
colorCode = "\033[35m"
case ColorCyan:
Expand Down

0 comments on commit 6019c70

Please sign in to comment.