You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
streampager: allow running Streampager without reading its config files
Currently, there is no way for a calling program (like `sl` or `jj`) to
start streampager without it trying to read
`$CONFIG/streampager/streampager.toml` and the environment variables
`SP_INTERFACE_MODE`, `SP_SCROLL_PAST_EOF`, and `SP_READ_AHEAD_LINES`.
This is undesireable if we'd like to control Streampager's behavior
fully from `jj` config (or `sl` config). Sapling currently overrides
the most important Streampager config from its own config anyway.
I'd like there to be a way to invoke Streampager with a given config.
I carefully implemented it so that no changes to Sapling are required,
though I think it'd also benefit from using the API I introduce here
(and the old UI could be deprecated).
Another, less invasive, possibility would be to simply make
`Pager::config` public. However, this would mean that Streampager
would uselessly read `$CONFIG/streampager/streampager.toml` even
if the config is later fully overriden by `jj`.
As an aside, the docs for the config from
https://github.com/markbt/streampager#example-configuration do not seem
to be fully correct, setting `interface_mode = "delayed"` as described
there did not work for me. However, I'd rather not use that
configuration method at all for my purposes with `jj`.
Cc: jj-vcs/jj#4203 (comment),
@yuja.
As ever, thanks for making it convenient for us to use Streampager in
`jj`! :)
0 commit comments