Three code paths in src/markdown/renderers/terminal.zig were stubbed out during the Zig 0.16.0 migration:
1. detectImageProtocol() always returns .none (~line 91)
std.posix.getenv was removed in Zig 0.16. The replacement (std.process.Environ.getPosix) requires an Environ instance, which requires either:
- Linking libc (so the C
environ global is available), or
- Accepting
std.process.Init.Minimal as the main parameter (which exposes the process environ via the new ELF startup path).
On Linux without libc, Zig 0.16's start.zig passes an empty environ block unless using callMainWithArgs.
Impact: TERM, TERM_PROGRAM, KITTY_WINDOW_ID, GHOSTTY_RESOURCES_DIR cannot be read — Kitty and iTerm2/Ghostty inline image output is permanently disabled.
2. readLocalFile() always returns null (~line 116)
3. writeKittyImagePath() is a no-op (~line 153)
std.fs access now requires an io context in Zig 0.16. Both functions stub out.
Fix options
Option A (idiomatic): Update main.zig to accept std.process.Init.Minimal and thread the environ + io through to the terminal renderer.
Option B: Link libc for the native binary and use std.c.getenv. Adds a libc dep to the CLI.
Text rendering is completely unaffected; inline images simply do not display in the meantime.
Three code paths in
src/markdown/renderers/terminal.zigwere stubbed out during the Zig 0.16.0 migration:1.
detectImageProtocol()always returns.none(~line 91)std.posix.getenvwas removed in Zig 0.16. The replacement (std.process.Environ.getPosix) requires anEnvironinstance, which requires either:environglobal is available), orstd.process.Init.Minimalas themainparameter (which exposes the process environ via the new ELF startup path).On Linux without libc, Zig 0.16's
start.zigpasses an empty environ block unless usingcallMainWithArgs.Impact:
TERM,TERM_PROGRAM,KITTY_WINDOW_ID,GHOSTTY_RESOURCES_DIRcannot be read — Kitty and iTerm2/Ghostty inline image output is permanently disabled.2.
readLocalFile()always returns null (~line 116)3.
writeKittyImagePath()is a no-op (~line 153)std.fsaccess now requires aniocontext in Zig 0.16. Both functions stub out.Fix options
Option A (idiomatic): Update
main.zigto acceptstd.process.Init.Minimaland thread the environ + io through to the terminal renderer.Option B: Link libc for the native binary and use
std.c.getenv. Adds a libc dep to the CLI.Text rendering is completely unaffected; inline images simply do not display in the meantime.