fj default pager (less) lacks --quit-if-one-screen: short list/view output hangs in the pager #156
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Symptom
fj pr list(and other list/view table commands) appear to "hang" / not resolve in an interactive terminal. Root cause: withPAGER/FJ_PAGERunset,fjpipes output through plainless, which opens a full-screen pager and waits forqeven when the output is a few rows (or empty). To the user it looks like the command never returned.Expected
Match
git/gh: only page when output exceeds the terminal height. Invoke the default pager with--quit-if-one-screen --no-init(i.e.less -FRX, or setLESS=-FRXfor the spawned pager), so short results print and return immediately and long results still page.Fix
less), pass-F(quit if one screen) and-R(raw control chars), and-X/--no-initso it doesn't clear the screen for short output.FJ_PAGER/PAGERas-is (user's choice).--no-pageralready works as the escape hatch; this just fixes the default.Env
PAGER/FJ_PAGERunset → defaults tolesswith no flags.