gum.js
This file
Path
examples/gum.js
13 lines · 383 bytes · JavaScript
Last changed by
Not known.
History of this fileTake it
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–13why, one step back1const { spawn } = require("child_process");23const activities = ["walking", "running", "cycling", "driving", "transport"];45console.log("What's your favorite activity?")6const gum = spawn("gum", ["choose", ...activities]);78gum.stderr.pipe(process.stderr);910gum.stdout.on("data", data => {11 const activity = data.toString().trim();12 console.log(`I like ${activity} too!`);13});