v0.9.0
guide / Using it with other tools

Using it with other tools

Print instead of browse: wr URL | less -R prints the formatted page and

v0.9.0 14 / 21 1 min read docs/GUIDE.md
  • Print instead of browse: wr URL | less -R prints the formatted page and exits — no interface, no interactivity, ideal for a quick look or a monitor. Width comes from Reading width or the COLUMNS variable (COLUMNS=60 wr URL | less -R). With NO_COLOR set (or TERM=dumb) the printed render has no colors at all; the interactive reader always uses them.

  • Pipes of Markdown: wr --md URL prints the Markdown, uncolored. Pipe it into whatever you like:

    wr --md https://go.dev/doc/effective_go | grep -n "gofmt"
    wr --md https://raw.githubusercontent.com/sazardev/wr/main/README.md > wr-readme.md
  • Add -L to any of these to drop the link addresses (--md -L URL).

  • Fresh copy: wr --fresh URL ignores the cache once.

  • Over SSH: it works, and copying uses the OSC 52 route, which travels through SSH to your local clipboard (your terminal must allow it).

  • Inside tmux: it works. For copying to reach your system clipboard through tmux, enable set -g set-clipboard on. The mouse works as long as your tmux passes it through (the default).

  • Version and updates: wr --version prints the version, wr --update looks for a newer release and installs it. Help: wr --help.

The pipe modes (| less -R and --md) always download the page again, so what you print is what the site says now; they also refresh the cache for next time.