mirror of
https://codeberg.org/scip/esctl.git
synced 2026-08-24 16:24:19 +02:00
add external pager support via ES_JSON_PAGER (#65)
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user