mirror of
https://github.com/cheat/cheat.git
synced 2026-03-07 19:23:34 +01:00
feat(pagination): implement paginated output
Implement a `pager` config option. If configured, `cheat` will automatically pipe output through the configured pager (where appropriate).
This commit is contained in:
@@ -6,6 +6,7 @@ import (
|
||||
"strings"
|
||||
|
||||
"github.com/cheat/cheat/internal/config"
|
||||
"github.com/cheat/cheat/internal/display"
|
||||
"github.com/cheat/cheat/internal/sheets"
|
||||
)
|
||||
|
||||
@@ -47,5 +48,5 @@ func cmdView(opts map[string]interface{}, conf config.Config) {
|
||||
}
|
||||
|
||||
// display the cheatsheet
|
||||
fmt.Print(sheet.Text)
|
||||
display.Display(sheet.Text, conf)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user