.TH MOOR 1 2022-07-21
.SH NAME
moor \- the nice pager
.SH SYNOPSIS
.B moor
[options]
.IR file \&.\|.\|.
.br
.B "moor \-\-help"
.br
.B "moor \-\-version"
.SH DESCRIPTION
.B moor
is a pager much like
.I less
(1), but with generally nicer out-of-the-box behavior.
.PP
More information and screenshots: https://github.com/walles/moor#readme
.PP
Inside of \fBmoor\fR, press
.B h
to access the built-in help.
.PP
Input is expected to be (optionally compressed) UTF-8 text.
Invalid / unprintable characters are by default rendered as '?'.
.PP
If you have opened multiple files, press
.B :
to switch between them.
.SH OPTIONS
Multiple-choice options all have the default value listed first.
.PP
All of these options can be appended to the
.B MOOR
environment variable for persistent configuration.
.PP
Doing
.B moor --help
will also list these options.
.TP
\fB\-\-colors\fR={\fBauto\fR | \fB8\fR | \fB16\fR | \fB256\fR | \fB16M\fR}
Size of color palette we output to the terminal
.TP
\fB\-\-debug\fR
Print debug logs after exiting, less verbose than
.B \-\-trace
.TP
\fB\-\-follow\fR
Scrolls automatically to follow piped input, just like
.B tail \-f
.TP
\fB\-\-lang\fR=string
Used for highlighting.
Without this flag highlighting is based on the input file name.
Valid values are MIME types like \fBtext/x-markdown\fP, file extensions like \fBmd\fP or language names like \fBmarkdown\fP.
For the source of truth on what is supported exactly, look in https://github.com/alecthomas/chroma/tree/master/lexers/embedded or its parent directory.
.TP
\fB\-\-mousemode\fR={\fBauto\fR | \fBselect\fR | \fBscroll\fR}
Guarantee selecting text with the mouse works but maybe not mouse scrolling.
Or guarantee mouse scrolling works but selecting text requiring extra effort.
Details here: https://github.com/walles/moor/blob/master/MOUSE.md
.TP
\fB\-\-no\-clear\-on\-exit\fR
Retain screen contents when exiting moor.
Affected by \fB--no-clear-on-exit-margin\fP.
.TP
\fB\-\-no\-clear\-on\-exit\-margin\fR=int
Leave this number of lines for your shell prompt after exiting. Defaults to 1. Affects \fB--no-clear-on-exit\fP and \fB--quit-if-one-screen\fP.
.TP
\fB\-\-no\-linenumbers\fR
Hide line numbers on startup, press left arrow key to show
.TP
\fB\-\-no\-reformat\fR
No effect, exists for backwards compatibility. See --reformat.
.TP
\fB\-\-no\-search\-line\-highlight\fR
Do not highlight the background of lines with search hits. The search hits themselves are still highlighted though, even with this option.
.TP
\fB\-\-no\-statusbar\fR
Hide the status bar, toggle with
.B =
.TP
\fB\-\-quit\-if\-one\-screen\fR
Print input contents without paging if the input fits on one screen.
Affected by \fB--no-clear-on-exit-margin\fP.
.TP
\fB\-\-reformat\fR
Reformat supported input files (JSON) before showing them.
.TP
\fB\-\-render\-unprintable\fR={\fBhighlight\fR | \fBwhitespace\fR}
How unprintable characters are rendered
.TP
\fB\-\-scroll\-left\-hint\fR=string
UTF-8 character indicating the view can scroll left, defaults to an inverse \fB<\fR.
This can be a string containing ANSI formatting.
The word
.B ESC
in caps will be interpreted as one escape character.
Example value for faint (using ANSI SGR code 2) tilde characters:
.B ESC[2m~
.TP
\fB\-\-scroll\-right\-hint\fR=string
UTF-8 character indicating the view can scroll right, defaults to an inverse \fB>\fR.
This can be a string containing ANSI formatting.
The word
.B ESC
in caps will be interpreted as one escape character.
Example value for faint (using ANSI SGR code 2) tilde characters:
.B ESC[2m~
.TP
\fB\-\-shift\fR=int
Arrow keys side scroll amount. Or try ALT+arrow to scroll one column at a time.
.TP
\fB\-\-statusbar\fR={\fBinverse\fR | \fBplain\fR | \fBbold\fR}
Status bar style
.TP
\fB\-\-style\fR={\fBnative\fR | \fIstyle\fR}
Highlighting style from https://xyproto.github.io/splash/docs/longer/all.html
.TP
\fB\-\-tab\-size\fR=int
Number of spaces per tab stop, defaults to 8. Or try
.B CTRL-t
to toggle when
.B moor
is running.
.TP
\fB\-\-terminal\-fg\fR
Use terminal foreground color rather than style foreground color for unstyled text.
Try this if your terminal window has a background image rather than a solid color.
.TP
\fB\-\-trace\fR
Print trace logs after exiting, more verbose than
.B \-\-debug
.TP
\fB\-\-wrap\fR
Wrap long lines, toggle with
.B w
.TP
\fB\+\1234\fR
Immediately scroll to line
.B 1234
.SH FILES
.TP
.B $XDG_DATA_HOME/moor/search_history
Moor will store your search history in this file. If $XDG_DATA_HOME is not set, the file will be
stored in the default XDG location, usually \fB~/.local/share/moor/search_history\fR.
.SH ENVIRONMENT
.TP
.B LESS_TERMCAP_*
For backwards compatibility with less, moor reads all
\fBLESS_TERMCAP_*\fR values.
In these values, both actual escape characters and the word
.B ESC
in caps are interpreted as escape characters.
In moor, styling should be done using the \fB\-\-style\fR option rather than using these environment variables.
Example value: \fBESC[1m\fR.
.TP
.B LESS_TERMCAP_md
Formatting used for man page bold text.
.TP
.B LESS_TERMCAP_us
Formatting used for man page underlined text.
.TP
.B LESS_TERMCAP_so
Formatting used for status bar and search hits.
.TP
.B LESSSECURE
Setting this to "1" prevents moor from opening new files or launching external programs, as required by
.B systemctl(1)\&.
In secure mode, the "v" command for opening the current file in an editor is disabled, and the search
history file is not updated.
.TP
.B MOOR
Additional options are read from this variable if it is set, just as if those same
options had been manually added to each moor invocation. Try setting it to
\fB\-\-reformat\fR to have JSON input automatically reformatted!
.TP
.B PAGER
If set to "moor", many programs will use
.B
moor
as their pager.
.TP
.B PAGER_LABEL
Other programs can set this to tell moor what name to show for stdin input.
.SH BUGS
Kindly report any bugs here: https://github.com/walles/moor/issues
