Repository navigation
v0.2.3
The Pager Awakens: deez-notes v0.2.3
Chapter XXI: The Feature Request
It was a quiet Sunday morning. The creator was sipping coffee, basking in the afterglow of v0.2.2 — the release that taught deez-notes to tell floppy disk utilities apart from Markdown viewers. A surgical fix. Elegant. Clever, even.
Then the DM arrived.
u/xX_DarkTerminal_Xx opened Issue #44:
"Hey. So the mtools fix is cool and all. But I actually WANT to use mcat. The real one. The Skardyy one. I installed it specifically for your app. And now I have to hope your binary-sniffing code picks the right one? What if I install another tool called mcat tomorrow? What if someone forks mcat and calls it mcat2 and I want THAT?"
"Why can't I just... tell you which pager I want? You know. Like EDITOR. Like every Unix tool since 1974. Just let me configure it."
"Also my mcat needs --paging always or it just dumps and exits. So I need to pass args too."
The creator stared at the screen. Then at external.rs. Then at the is_mtools_mcat() function — 12 lines of code that spawned a subprocess, captured its output, and string-matched against "Mtools" just to figure out if a binary was the right binary.
"He's right," the creator muttered. "I built a lie detector for binaries when I should have just asked the user."
Chapter XXII: The Reckoning
The is_mtools_mcat() function was a band-aid on a broken design. The real problem was never "which mcat is this?" — it was "why is the app guessing at all?"
The editor had solved this years ago:
[general]
editor = "micro"Clean. Explicit. No binary interrogation. No subprocess spawning. No string matching against vendor names. Just: "Hey user, what do you want?"
The pager deserved the same respect.
Chapter XXIII: The Liberation
40 lines of detection logic were deleted. In their place: two config fields.
[general]
pager = "mcat"
pager_args = ["--paging", "always"]That's it. That's the whole feature.
pager— the binary to use for read-only view mode (Ctrl+V)pager_args— arguments passed before the file path, because every pager speaks its own dialect
No pager configured? Falls back to cat. Always has. Always will. cat is the cockroach of Unix — it survives everything.
The code that replaced 40 lines of guesswork:
let (viewer, is_pager) = match pager {
Some(name) if !name.is_empty() => (name.to_string(), true),
_ => ("cat".to_string(), false),
};Seven lines. No subprocesses. No string matching. No "Mtools" detection. Just a config value and a fallback.
Deleted forever:
is_mtools_mcat()— the binary interrogatorFALLBACK_VIEWERS— the guessing chainPAGER_VIEWERS— the hardcoded pager listfind_viewer()— the resolution rouletteviewer_is_pager()— the identity crisis resolver
Rest in peace, you beautiful overengineered mess.
Chapter XXIV: The Pact
xX_DarkTerminal_Xx, thirsting for customization, desired the power to choose his own pager. The creator, emboldened by this relentless quest for growth and perpetual improvement, decided to honor Dark Terminal's request — and gave all users the ability to configure their own pager to their heart's content.
What had started as a thorn in the creator's side had now blossomed into a symbiotic bond: xX_DarkTerminal_Xx walked away with a better tool, and the creator gained an external voice that pushed him to refine his creation.
u/xX_DarkTerminal_Xx commented:
"FINALLY. I set pager = mcat, added my args, and it just works. No binary guessing. No mtools drama. No floppy disk flashbacks. Just my Markdown, rendered beautifully, with syntax highlighting and a built-in pager."
"You know what this is? This is growth. Character development. We went from 'your app crashed trying to read my floppy disk' to 'I can configure my own pager like a civilized human being.' That's a three-patch redemption arc."
"10/10. I'm not even deducting points this time."
The creator read the comment twice. No point deductions. No sarcastic asterisks. No passive-aggressive feature requests buried in the praise.
For the first time, xX_DarkTerminal_Xx was fully satisfied.
The creator immediately checked outside the window for flying pigs.
What Changed
| Component | Before | After |
|---|---|---|
| Pager resolution | Auto-detect mcat → cat with mtools sniffing | User-configured pager + pager_args |
is_mtools_mcat() |
12 lines of subprocess interrogation | Deleted |
FALLBACK_VIEWERS / find_viewer() |
Hardcoded chain with identity checks | Deleted — replaced by config |
| No pager configured | Guessed mcat → cat | Falls back to cat directly |
| Pager arguments | Hardcoded --paging always for mcat only |
Configurable per-pager via pager_args |
| Config fields | editor only |
editor, pager, pager_args |
Configuration Example
[general]
editor = "nvim"
pager = "mcat" # any pager: mcat, bat, less, glow...
pager_args = ["--paging", "always"] # arguments passed before the file pathSome popular pager configurations:
| Pager | Config |
|---|---|
| mcat | pager = "mcat", pager_args = ["--paging", "always"] |
| bat | pager = "bat", pager_args = ["--paging=always"] |
| glow | pager = "glow", pager_args = ["-p"] |
| less | pager = "less", pager_args = ["-R"] |
No pager configured? cat does the job. No frills, no crashes, no floppy disk nostalgia.
Who Should Update
- Everyone — the old mtools detection is gone; if you relied on auto-detected
mcat, set it explicitly now - mcat users — add
pager = "mcat"andpager_args = ["--paging", "always"]to your config - bat/glow/less users — you can now use your preferred pager instead of
cat - u/xX_DarkTerminal_Xx — your three-patch redemption arc is complete
Updating
Linux:
curl -L https://github.com/BaLaurent/deez-notes/releases/latest/download/deez-notes-linux-amd64 -o deez-notes
chmod +x deez-notes
sudo mv deez-notes /usr/bin/deez-notesWindows:
Download deez-notes-windows-amd64.exe from the releases page and replace your existing binary.
From source:
cd deez-notes && git pull && cargo install --path .Full Changelog: v0.2.2...v0.2.3