+ switch event.Kind {
+ case "busy":
+ busy = true
+ case "idle":
+ busy = false
+ }
+
+ text += "\n"
+ if prompt {
+ text = "\r\x1b[2K" + text
+ }
+
+ prompt = columns > 0 && !busy
+ if prompt {
+ text += "> "
+ }
+
+ _, err = io.WriteString(out, text)