I can't believe I've waited this long to create this stupid shell function:

```
rfc() {
local rfc="rfc${1##rfc}";
curl -s "https://www.rfc-editor.org/rfc/${rfc}.txt" | ${PAGER:-more}
}
```

@jschauma Mine also opens the index if you say `rfc index`.

(I also have them local via the rsync download which I suppose is less important than it was ten years ago.)

@partim Yeah, I started out with a local copy of all RFCs as well.

For others stumbling on this thread:
https://www.rfc-editor.org/retrieve/rsync/

E.g., from cron:
0 0 1 * * rsync -az --include '*.txt' --exclude '*' rsync.rfc-editor.org::rfcs-text-only /usr/local/share/rfcs/.

@jschauma @partim now I’m wondering if I should just dump them all in Zotero for reference.
@jschauma I don’t even have a cron job for it. Since I am not getting the drafts, the occasional manual update is good enough.

@jschauma When you want it in plain text for the canonical document, great!

Invoking a browser with the URL https://datatracker.ietf.org/doc/html/rfc1925 has a view that includes things like a clickable table of contents. I tend to use the "open" shortcut on mac for this.

RFC 1925: The Twelve Networking Truths

This memo documents the fundamental truths of networking for the Internet community. This memo does not specify a standard, except in the sense that all standards must implicitly follow the fundamental truths. This memo provides information for the Internet community. This memo does not specify an Internet standard of any kind.

IETF Datatracker
@jschauma i wonder if i can configure my terminal to auto paste a local profile in shells to recover alias and function everywhere without touching the devices

@jschauma I'm never sure how much self-promotion is appropriate for this, but: https://github.com/paulehoffman/ietf-cli

rfc, draft (with partial name), tracker (for almost anything there), and so on. Issues and PRs welcome (but I admit my Python style here is a tad twee).

GitHub - paulehoffman/ietf-cli: Command-line interface for accessing IETF documents and other information

Command-line interface for accessing IETF documents and other information - paulehoffman/ietf-cli

GitHub
@paulehoffman Oh, that looks neat! Will give that a try later.
@jschauma Copied your function then thought it strange I was getting 301 redirects. Mastodon being too cute stripping "https:" and "www." from URLs.
@jschauma 'test -t 1 && PAGER=cat'
@rsalz The canonical less(1) already does that, more or less (get it, get it?).
@jschauma I know but other pagers don't necessarily

@jschauma

Heh. I had something similar in my .bashrc for a long time.
A couple of years ago, I upgraded to https://github.com/bfontaine/rfc

#RFC #CLI

GitHub - bfontaine/rfc: :page_facing_up: Read RFCs from the command-line

:page_facing_up: Read RFCs from the command-line. Contribute to bfontaine/rfc development by creating an account on GitHub.

GitHub
@jschauma @paul_ipv6 I did something like this some years ago and then largely forgot about it: https://rfc.me/2324
RFC 2324: Hyper Text Coffee Pot Control Protocol (HTCPCP/1.0)

This document describes HTCPCP, a protocol for controlling, monitoring, and diagnosing coffee pots. This memo provides information for the Internet community. It does not specify an Internet standard of any kind.

IETF Datatracker