summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xcac8
1 files changed, 7 insertions, 1 deletions
diff --git a/cac b/cac
index bcf745d..ed3d6e7 100755
--- a/cac
+++ b/cac
@@ -73,7 +73,13 @@ __cac_cli__help() {(
# test -t expects GNU coreutils
if test -t 0 >/dev/null 2>&1; then
filter() {
- $PAGER "$@"
+ help=$(cat)
+ echo "$help" |
+ if test $(echo "$help" | wc -l) -gt $(tput lines); then
+ $PAGER "$@"
+ else
+ cat "$@"
+ fi
}
else
filter() {