gum/spin/options.go
Maas Lalani 454040cf4d
feat: Add gum spin command
Spin provides a shell script interface for the spinner bubble. It is
useful for displaying that some task is running in the background while
consuming it's output so that it is not shown to the user.

For example, let's do a long running task:
```
sleep 5
```

We can simply prepend a spinner to this task to show it to the user,
while performing the task / command in the background.

```
gum spin -t "Taking a nap..." -- sleep 5
```

The spinner will automatically exit when the task is complete.
2022-07-07 13:29:10 -04:00

11 lines
435 B
Go

package spin
// Options is the customization options for the spin command.
type Options struct {
Command []string `arg:"" help:"Command to run"`
Color string `help:"Spinner color" default:"#FF06B7"`
Title string `help:"Text to display to user while spinning" default:"Loading..."`
Spinner string `help:"Spinner type" type:"spinner" enum:"line,dot,minidot,jump,pulse,points,globe,moon,monkey,meter,hamburger" default:"dot"`
}