gum.rb
This file
The walk stopped after 200 commits: lines older than 6837ed2 point at it.
feat(deps): bump github.com/charmbracelet/bubbletea from 0.27.0 to 1.0.0 (#661)dependabot[bot]before adoption6837ed2
lines 1–29why, one step back1puts 'What is your name?'2name = `gum input --placeholder "Your name"`.chomp34puts "Hello #{name}!"56puts 'Pick your 2 favorite colors'78COLORS = {9 'Red' => '#FF0000',10 'Blue' => '#0000FF',11 'Green' => '#00FF00',12 'Yellow' => '#FFFF00',13 'Orange' => '#FFA500',14 'Purple' => '#800080',15 'Pink' => '#FF00FF'16}.freeze1718colors = `gum choose #{COLORS.keys.join(' ')} --limit 2`.chomp.split("\n")1920if colors.length == 221 first = `gum style --foreground '#{COLORS[colors[0]]}' '#{colors[0]}'`.chomp22 second = `gum style --foreground '#{COLORS[colors[1]]}' '#{colors[1]}'`.chomp23 puts "You chose #{first} and #{second}."24elsif colors.length == 125 first = `gum style --foreground '#{COLORS[colors[0]]}' '#{colors[0]}'`.chomp26 puts "You chose #{first}."27else28 puts "You didn't pick any colors!"29end