TP(1)

πŸ“¦
version 2.10 Β· 3 versions
, in fedora 43

🌸 TP(1) β€” the manual page, but make it bestie 🌸

okay so this is tp, from the User Contributed Perl Documentation section, and it's literally a pager written in pure perl. no cap. let's get into it πŸ’…


✨ NAME ✨

tp β€” a pure perl pager. that's it, that's the whole vibe. πŸ¦‹


πŸŽ€ SYNOPSIS πŸŽ€

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

πŸ’– OPTIONS πŸ’–

  • -e β€” exit at the end of the file. like, we're done here, bye πŸ‘‹
  • -f STR β€” if you define this, the pager will pause whenever the character sequence you put in STR shows up in the input text. so dramatic of it.

the default value when this is enabled is formfeed, i.e. ^L β€” this is to mimic the traditional behavior of "1" in more. but bestie, due to the pecularities of Getopt::Long, you need to use the -- argument separator to actually trigger it, like:

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

you can also hand it a regular expression as STR, e.g.

tp -f '[ie]t' bar #pauses on lines in bar with "it" or "et" in them
  • -J β€” adds a whole column with markers showing which lines match a search expression. it's giving annotation core. πŸ”
  • -n β€” display line numbering. you can toggle it at run time with #. iconic.
  • -r β€” send raw control characters from the input straight to the terminal, unadulterated, no filter, no nothing. by default though, characters other than tab and newline get converted to caret notation β€” e.g. ^@ for null, or ^L for form feed.
  • -s β€” squeeze multiple blank lines into one. tidy queen 🧹
  • -S β€” do not fold long lines. let them be long, let them live.
  • -[ or --scrollbar β€” display an interactive scrollbar in the right-most column. main character energy, honestly.
  • -$ or --tail β€” keep checking the displayed file for new content. only available when you're paging a single file, so don't get cute with it. 🌈
  • --cols β€” set the number of columns for the pager.

if it's absent, the terminal gets queried directly with Term::ReadKey if that's loaded, or stty, or tput. and if all of those fail? it just defaults to 80. resilience πŸ’ͺ


🫢 User Interface 🫢

quick key for the notation, bestie: "C-" means Control, "M-" means Meta/Alt, "S-" means 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 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 these variables: LESS, MORE, TPOPT, TERM and TERMCAP. yes, all five. it's thorough like that. πŸ‘‘

the TPOPT variable is used to set options explicitly for tp, by concatenating undecorated options together β€” e.g. Sr for squished raw output. no dashes, no spaces, just vibes.

LESS and MORE are checked for options that tp supports, and if any are detected, they get enabled. respectful of your past, honestly πŸ₯Ί


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


and that's the whole page, bestie!! this one's from perl v5.42.0, dated 2025-07-25 β€” go forth and page things, you absolute icon πŸ’–βœ¨πŸŽ€πŸ¦‹πŸŒΈ

πŸ“¦ where this page comes from