add external pager support via ES_JSON_PAGER (#65)

This commit is contained in:
T. von Dein
2026-07-03 10:07:11 +02:00
parent 7b576c976c
commit 1fc2004474
6 changed files with 77 additions and 17 deletions

View File

@@ -36,3 +36,14 @@ func GetTermWidth() int {
return 80
}
func GetTermHeight() int {
if term.IsTerminal(int(os.Stdout.Fd())) {
_, height, err := term.GetSize(int(os.Stdout.Fd()))
if err == nil {
return height
}
}
return 25
}