Merge pull request #11651 from cli/kw/agent-task-list-pager
`gh agent-task list`: pager support
This commit is contained in:
commit
d39c8c2fe1
1 changed files with 6 additions and 0 deletions
|
|
@ -133,6 +133,12 @@ func listRun(opts *ListOptions) error {
|
|||
return cmdutil.NewNoResultsError("no agent tasks found")
|
||||
}
|
||||
|
||||
if err := opts.IO.StartPager(); err == nil {
|
||||
defer opts.IO.StopPager()
|
||||
} else {
|
||||
fmt.Fprintf(opts.IO.ErrOut, "error starting pager: %v\n", err)
|
||||
}
|
||||
|
||||
cs := opts.IO.ColorScheme()
|
||||
tp := tableprinter.New(opts.IO, tableprinter.WithHeader("Session ID", "Pull Request", "Repo", "Session State", "Created"))
|
||||
for _, s := range sessions {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue