Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
p - a lazy wrapper for $PAGER
Shell
branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
bin
man
LICENSE.txt
README.md

README.md

p - a lazy wrapper for $PAGER

NAME

p(1) - a lazy wrapper for $PAGER

SYNOPSIS

p
p ...

DESCRIPTION

p(1) is a lazy wrapper for $PAGER, which brings any pager a similar functionality of the -F/--quit-if-one-screen option of less(1).

When invoked as a piped pager (i.e. the standard input is not a terminal) without a file argument, it delays a pager invocation until it gets more lines than are displayable in the current terminal. The line number limit is estimated by subtracting two from the terminal's height to leave room for shell prompts.

If any argument is given or the standard input is a terminal, it becomes eager enough to delegate everything to the pager. This means calling p with a - (... | p -) always invokes the pager even if it gets small input.

Lastly, if the standard output is not a terminal, it just passes the standard input through to the standard output without calling a pager.

ENVIRONMENT

  • PAGER

    The command (or command line) wrapped around and invoked by this wrapper.

SEE ALSO

less(1)

AUTHOR

Copyright (c) 2012 Akinori MUSHA.

Licensed under the 2-clause BSD license. See LICENSE.txt for details.

Visit GitHub Repository for the latest information.

Something went wrong with that request. Please try again.