summaryrefslogtreecommitdiff
path: root/templates/terminal/length/node.def
diff options
context:
space:
mode:
Diffstat (limited to 'templates/terminal/length/node.def')
-rw-r--r--templates/terminal/length/node.def12
1 files changed, 12 insertions, 0 deletions
diff --git a/templates/terminal/length/node.def b/templates/terminal/length/node.def
new file mode 100644
index 0000000..a6aaa85
--- /dev/null
+++ b/templates/terminal/length/node.def
@@ -0,0 +1,12 @@
+help: "Set terminal page length [0 will disable paging]"
+run: if [ -n "$3" ] ; then
+ if [ $3 -eq 0 ] ; then
+ OFR_PAGER='cat -s' ;
+ else
+ export LINES=$3 ;
+ stty rows $3 ;
+ fi ;
+ else
+ eval $( resize ) ;
+ fi ;
+ : ${OFR_PAGER:=${OFR_DEFAULT_PAGER}}