mirror of
https://github.com/coder/coder.git
synced 2026-06-07 15:08:20 +00:00
836324e641
Fixes coder/internal#892 Fixes coder/internal#896 Example output: ``` ❯ coder exp task list ID NAME STATUS STATE STATE CHANGED MESSAGE a7a27450-ca16-4553-a6c5-9d6f04808569 task-hardcore-herschel-bd08 running idle 5h22m3s ago Listed root directory contents, working directory reset 50f92138-f463-4f2b-abad-1816264b065f task-musing-dewdney-f058 running idle 6h3m8s ago Completed arithmetic calculation ```
21 lines
380 B
Go
21 lines
380 B
Go
package cli
|
|
|
|
import (
|
|
"github.com/coder/serpent"
|
|
)
|
|
|
|
func (r *RootCmd) tasksCommand() *serpent.Command {
|
|
cmd := &serpent.Command{
|
|
Use: "task",
|
|
Aliases: []string{"tasks"},
|
|
Short: "Experimental task commands.",
|
|
Handler: func(i *serpent.Invocation) error {
|
|
return i.Command.HelpHandler(i)
|
|
},
|
|
Children: []*serpent.Command{
|
|
r.taskList(),
|
|
},
|
|
}
|
|
return cmd
|
|
}
|