tp(1)

TP(1) User Contributed Perl Documentation TP(1)

NAME

tp - a pure perl pager

SYNOPSIS

    tp -[JSenrs] [-cols] [-f STR] [-j|+ #] [-p|+/ STR] [FILE]...

OPTIONS

-e
Exit at end of file.
-f STR
If defined, the pager will pause when the character sequence specified by STR is encountered in the input text.

The default value when enabled is formfeed i.e; ^L; in order to mimic traditional behavior of "1" in more, but due to the pecularities of Getopt::Long> you need to use the -- argument separator in order to to trigger this e.g;

    tp -f -- foo #pauses on lines in foo with "^L" in them
    

You might also supply a regular expression as STR e.g;

    tp -f '[ie]t' bar #pauses on lines in bar with "it" or "et" in them
    
-J
Add a column with markers indicating which lines match a search expression.
-n
Display line numbering. Toggleable at run time with #.
-r
Send raw control characters from input unadulterated to the terminal. By default, chracters other than tab and newline will be converted to caret notation e.g; ^@ for null or ^L for form feed.
-s
Squeeze multiple blank lines into one.
-S
Do not fold long lines.
-[ or --scrollbar
Display an interactive scrollbar in the right-most column.
-$ or --tail
Keep checking the displayed file for new content. Only available when paging a single file.
--cols
Set the number of columns for the pager.

If absent, the terminal is queried directly with Term::ReadKey if loaded or "stty" or "tput", and if these fail it defaults to 80.

User Interface

"C-" is Control, "M-" is Meta/Alt, "S-" is Shift, and "\d+" is a sequence of digits

General

help - "h" or "H"
close - "q" or "Q" or ":q" or ":Q"
refresh - "r" or "C-l" or "C-R"
flush buffer - "R"
save buffer - ":w"
open file - ":e"
down one line - "ENTER" or "e" or "j" or "J" or "C-e" or "C-n" or "down arrow"
down half page - "d" or "C-d"
down one page - "SPACE" "f" or "z" or "C-f" or "C-v" or "M-space" or "PgDn"
up one page - "b" or "w" or "C-b" or "M-v" or "PgUp"
up half page - "u" or "C-u"
up one line - "k" or "y" or "K" or "Y" or "C-K" or "C-P" or "C-Y" or "up arrow"
to bottom - "G" or "$" or ">" or "M->" or "End"
to top - "g" or "<" or "M-<"
left one tab - "left arrow"
left half screen - "S-left arrow"
right half screen - "S-right arrow"
jump to line number - "\d+"
next file - ":n" or "S-M-right arrow"
previous file - ":p" or "S-M-left arrow"

Bookmarks

Save mark - "m" or "Ins"
Goto mark - "'"
Special mark: Beginning of file - "^"
Special mark: End of file - "$"
Special mark: Previous location - "'"
Special mark: List user-created marks - """
Special mark: "\d" - Top of file \d when viewing multiple files
forward - /
backward - ?
next match - n or P
previous match - p or N
grep (show only matching lines) - &

Options

toggle line-numbering - #
toggle folding - S
toggle raw/cooked output - C

ENVIRONMENT

tp checks the LESS, MORE, TPOPT, TERM and TERMCAP variables.

The TPOPT variable is used to set options explicitly for tp, by concatenating undecorated options together e.g; Sr for squished raw output.

LESS and MORE are checked for options that tp supports, and if detected they are enabled.

SEE ALSO

IO::Pager::Perl, less(1)

AUTHORS

    Jerrad Pierce jpierce@cpan.org

LICENSE

  • Thou shalt not claim ownership of unmodified materials.
  • Thou shalt not claim whole ownership of modified materials.
  • Thou shalt grant the indemnity of the provider of materials.
  • Thou shalt use and dispense freely without other restrictions.

Or, if you prefer:

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.0 or, at your option, any later version of Perl 5 you may have available.

2020-11-08 perl v5.34.0