[ Home | Main Table Of Contents | Table Of Contents | Keyword Index ]

cmdr::pager(n) 1 doc "Cmdr, a framework for command line parsing and dispatch"

Name

cmdr::pager - Cmdr - Paging long output

Table Of Contents

Synopsis

  • package require linenoise
  • package require cmdr::tty
  • package require cmdr::pager

Description

Welcome to the Cmdr project, written by Andreas Kupries.

For availability please read Cmdr - How To Get The Sources.

This package provides a single utility command to manage the automatic paging of long output, like it is done cmdr's automatic help.

API

::cmdr::pager text

When invoked this command either simply prints the text to stdout, or invokes an external pager application to manage the output.

The pager is only invoked when

  1. Stdout is a terminal, and

  2. The text does not fit into the height of the terminal, and

  3. a pager application could be found.

If any of the above conditions fail the text is simply printed.

When the command comes to the third condition above it will look for the pager specified in the environment variable PAGER first, and then less and more, in this order.

string text

The text to print or page.

The result of the command is the empty string.

Bugs, Ideas, Feedback

Both the package(s) and this documentation will undoubtedly contain bugs and other problems. Please report such at Cmdr Tickets.

Please also report any ideas you may have for enhancements of either package(s) and/or documentation.

Keywords

arguments, command hierarchy, command line completion, command line handling, command tree, editing command line, help for command line, hierarchy of commands, interactive command shell, optional arguments, options, parameters, processing command line, tree of commands