Today — termlens inspect forwards a useful subset of TerminalBuilder to the command line: --size, --timeout, --idle, --inherit-env, --env, --ansi. Measured on 0.10.1, grep -oE '"--[a-z-]+"' crates/termlens-cli/src/main.rs shows no --cwd, and TerminalBuilder::current_dir has no way through — so inspecting a program that reads files relative to its working directory means cd first, and inspecting one that must run elsewhere is impossible without a subshell.
Why it is worth fixing — inspect exists so you can point the harness at a program without writing a test. The working directory is part of "how the program is normally run", and it is already a builder method — this is plumbing, not design.
Fix — add --cwd PATH to the inspect flag loop in crates/termlens-cli/src/main.rs, calling TerminalBuilder::current_dir. Follow --size's error shape for a path that does not exist: name the flag and show what was expected. Mention it in INSPECT_USAGE and in crates/termlens-cli/README.md.
Done when
A good first contribution: one file, no architecture decisions. Start with
CONTRIBUTING.md
— §1 lists every gate you can run locally, and §3 asks that a change land
with a test. Commits are Conventional Commits and need git commit -s
(DCO). Happy to review a draft PR early.
Today —
termlens inspectforwards a useful subset ofTerminalBuilderto the command line:--size,--timeout,--idle,--inherit-env,--env,--ansi. Measured on 0.10.1,grep -oE '"--[a-z-]+"' crates/termlens-cli/src/main.rsshows no--cwd, andTerminalBuilder::current_dirhas no way through — so inspecting a program that reads files relative to its working directory meanscdfirst, and inspecting one that must run elsewhere is impossible without a subshell.Why it is worth fixing —
inspectexists so you can point the harness at a program without writing a test. The working directory is part of "how the program is normally run", and it is already a builder method — this is plumbing, not design.Fix — add
--cwd PATHto the inspect flag loop incrates/termlens-cli/src/main.rs, callingTerminalBuilder::current_dir. Follow--size's error shape for a path that does not exist: name the flag and show what was expected. Mention it inINSPECT_USAGEand incrates/termlens-cli/README.md.Done when
termlens inspect --cwd /tmp sh -c pwdshows/tmp.crates/termlens-cli/tests/cli.rscovers both.A good first contribution: one file, no architecture decisions. Start with
CONTRIBUTING.md
— §1 lists every gate you can run locally, and §3 asks that a change land
with a test. Commits are Conventional Commits and need
git commit -s(DCO). Happy to review a draft PR early.