Thanks to visit codestin.com
Credit goes to github.com

Skip to content

joelpeapen/moar

 
 

Repository files navigation

Linux CI Windows CI

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:

Moar displaying its own source code

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:

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 and top for human beings
  • riff, a diff filter highlighting which line parts have changed

Installing

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.

Configuring

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'

Setting moar as your default pager

Set it as your default pager by adding...

export PAGER=/usr/local/bin/moar

... to your .bashrc.

Issues

Issues are tracked here, or you can send questions to [email protected].

About

Moar, but with vim keybindings

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Go 96.2%
  • Shell 2.5%
  • Roff 1.2%
  • C 0.1%