TP(1)

πŸ“¦ version 2.10, in arch rolling

πŸ’– TP(1) πŸ’–

okay so welcome to TP(1), bestie β€” a User Contributed Perl Documentation moment for tp, the pure perl pager. No cap, this page is your group-chat cheat sheet for paging files like a main character. πŸ’…

🌸 NAME 🌸

tp β€” a pure perl pager. That's the whole name section, iconic and concise.

✨ SYNOPSIS ✨

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

Yes bestie, that line is literally the whole vibe check for how you call it.

πŸ’… OPTIONS πŸ’…

  • -e β€” Exit at the end of the file. Bye at EOF, periodt.
  • -f STR β€” If STR is defined, the pager pauses when the character sequence specified by STR is encountered in the input text. When enabled, the default value is formfeed, i.e. ^L; that's to mimic the traditional behavior of "1" in more, but because of the peculiarities of Getopt::Long you need to use the -- argument separator 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. Search girlies stay winning.
  • -n β€” Display line numbering. Toggleable at run time with #.
  • -r β€” Send raw control characters from input unadulterated to the terminal. By default, characters other than tab and newline are converted to caret notation, e.g. ^@ for null or ^L for form feed.
  • -s β€” Squeeze multiple blank lines into one. Minimalism.
  • -S β€” Do not fold long lines. Let them stretch, long-line main character energy.
  • -[, --scrollbar β€” Display an interactive scrollbar in the right-most column.
  • -$, --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 🫢

Quick decoder ring, bestie: C- is Control, M- is Meta/Alt, S- is Shift, and \d+ is a sequence of digits. iykyk.

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 one tab β€” right 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). That's the crossover episode.

πŸ‘‘ AUTHORS πŸ‘‘

Jerrad Pierce jpierce@cpan.org β€” the author, slay.

πŸŽ€ 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.


πŸ’– That's the TP(1) manual page, bestie β€” brought to you by perl v5.42.0 and dated 2025-12-14. Now go forth and page like the icon you are. πŸ’…βœ¨

πŸ“¦ where this page comes from