Moar is a pager. It reads and displays UTF-8 encoded text from files or pipelines.
moar
is designed to just do the right thing without any configuration:
The intention is that Moar should be trivial to get into if you have previously been using Less. If you come from Less and find Moar confusing or hard to migrate to, please report it!
Doing the right thing includes:
- Syntax highlight source code by default using Chroma
- Search is incremental / find-as-you-type just like in Chrome or Emacs
- Search becomes case sensitive if you add any UPPER CASE characters to your search terms, just like in Emacs
- Regexp search if your search string is a valid regexp
- Supports displaying ANSI color coded texts (like the output from
git diff
|riff
for example) - Supports UTF-8 input and output
- Transparent decompression when viewing compressed text
files
(
.gz
,.bz2
,.xz
,.zst
,.zstd
) or streams - The position in the file is always shown
- Supports word wrapping (on actual word boundaries) if requested using
--wrap
or by pressing w - Follows output as long as you are on the last line,
just like
tail -f
- Renders terminal hyperlinks properly
- Mouse Scrolling works out of the box (but look here for tradeoffs)
For compatibility reasons, moar
uses the formats declared in these environment variables if present:
LESS_TERMCAP_md
: Man page boldLESS_TERMCAP_us
: Man page underlineLESS_TERMCAP_so
: Status bar and search hits
For configurability reasons, moar
reads extra command line options from the
MOAR
environment variable.
Moar is used as the default pager by:
px
/ptop
,ps
andtop
for human beingsriff
, a diff filter highlighting which line parts have changed
Run ./test.sh
Pick a binary for your platform from the releases folder and you can copy to your $PATH.
And now you can just invoke moar
from the prompt!
Try moar --help
to see options.
Do moar --help
for an up to date list of options.
Environment variable MOAR
can be used to set default options.
For example:
export MOAR='--statusbar=bold --no-linenumbers'
Set it as your default pager by adding...
export PAGER=/usr/local/bin/moar
... to your .bashrc
.
Issues are tracked here, or you can send questions to [email protected].