-
Notifications
You must be signed in to change notification settings - Fork 383
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
switch builtin pager to streampager #4203
Conversation
I would really like a version of IIRC, streampager's interface seemed a bit annoying in parts by default, so we might want to change its default config (or try it out at least). Apart from that, I think this might be great! |
Totally agree, and the stripped-down version exists in Sapling tree. Asked question at markbt/streampager#61 |
193516d
to
7ea0283
Compare
2c07fa0
to
b2e8fdf
Compare
Updated dependency to sapling-streampager. |
097b69f
to
7bf4644
Compare
Perhaps, the "windows" feature was enabled through "minus" or "scm-record". If I removed "minus" in earlier revision, the Windows build of crossterm 0.27.0 failed.
The WTFPL license is added to the allow list. I've never heard about this license, but it's basically the same as public domain according to wikipedia.
According to the discussion on Discord, streampager is still maintained. It brings more dependencies, but seems more reliable in our use case. For example, the streampager doesn't consume inputs indefinitely whereas minus does. We can also use OS-level pipe to redirect child stderr to the pager.
7bf4644
to
4a50a11
Compare
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`! :)
This also changes the default to be closer to `less -FRX`. Since this default last changed very recently in jj-vcs#4203, I didn't mention this in the Changelog. As discussed in jj-vcs#4203 (comment)
This also changes the default to be closer to `less -FRX`. Since this default last changed very recently in jj-vcs#4203, I didn't mention this in the Changelog. As discussed in jj-vcs#4203 (comment)
This also changes the default to be closer to `less -FRX`. Since this default last changed very recently in jj-vcs#4203, I didn't mention this in the Changelog. As discussed in jj-vcs#4203 (comment)
This also changes the default to be closer to `less -FRX`. Since this default last changed very recently in jj-vcs#4203, I didn't mention this in the Changelog. As discussed in jj-vcs#4203 (comment)
…ests? This also changes the default to be closer to `less -FRX`. Since this default last changed very recently in #4203, I didn't mention this in the Changelog. As discussed in #4203 (comment) I initially kept the config closer to streampager's (see https://github.com/jj-vcs/jj/compare/main...ilyagr:jj:streamopts?expand=1), but then decided to make it more generic, smaller, and hopefully easier to understand.
This also changes the default to be closer to `less -FRX`. Since this default last changed very recently in jj-vcs#4203, I didn't mention this in the Changelog. As discussed in jj-vcs#4203 (comment)
…ests? This also changes the default to be closer to `less -FRX`. Since this default last changed very recently in #4203, I didn't mention this in the Changelog. As discussed in #4203 (comment) I initially kept the config closer to streampager's (see https://github.com/jj-vcs/jj/compare/main...ilyagr:jj:streamopts?expand=1), but then decided to make it more generic, smaller, and hopefully easier to understand.
This also changes the default to be closer to `less -FRX`. Since this default last changed very recently in #4203, I didn't mention this in the Changelog. As discussed in #4203 (comment) I initially kept the config closer to streampager's (see https://github.com/jj-vcs/jj/compare/main...ilyagr:jj:streamopts?expand=1), but then decided to make it more generic, smaller, and hopefully easier to understand.
This also changes the default to be closer to `less -FRX`. Since this default last changed very recently in #4203, I didn't mention this in the Changelog. As discussed in #4203 (comment) I initially kept the config closer to streampager's (see https://github.com/jj-vcs/jj/compare/main...ilyagr:jj:streamopts?expand=1), but then decided to make it more generic, smaller, and hopefully easier to understand.
This also changes the default to be closer to `less -FRX`. Since this default last changed very recently in jj-vcs#4203, I didn't mention this in the Changelog. As discussed in jj-vcs#4203 (comment)
This also changes the default to be closer to `less -FRX`. Since this default last changed very recently in #4203, I didn't mention this in the Changelog. As discussed in #4203 (comment) I initially kept the config closer to streampager's (see https://github.com/jj-vcs/jj/compare/main...ilyagr:jj:streamopts?expand=1), but then decided to make it more generic, smaller, and hopefully easier to understand.
This also changes the default to be closer to `less -FRX`. Since this default last changed very recently in jj-vcs#4203, I didn't mention this in the Changelog. As discussed in jj-vcs#4203 (comment)
This also changes the default to be closer to `less -FRX`. Since this default last changed very recently in #4203, I didn't mention this in the Changelog. As discussed in #4203 (comment) I initially kept the config closer to streampager's (see https://github.com/jj-vcs/jj/compare/main...ilyagr:jj:streamopts?expand=1), but then decided to make it more generic, smaller, and hopefully easier to understand.
This also changes the default to be closer to `less -FRX`. Since this default last changed very recently in jj-vcs#4203, I didn't mention this in the Changelog. As discussed in jj-vcs#4203 (comment)
This also changes the default to be closer to `less -FRX`. Since this default last changed very recently in #4203, I didn't mention this in the Changelog. As discussed in #4203 (comment) I initially kept the config closer to streampager's (see https://github.com/jj-vcs/jj/compare/main...ilyagr:jj:streamopts?expand=1), but then decided to make it more generic, smaller, and hopefully easier to understand.
This also changes the default to be closer to `less -FRX`. Since this default last changed very recently in jj-vcs#4203, I didn't mention this in the Changelog. As discussed in jj-vcs#4203 (comment)
This also changes the default to be closer to `less -FRX`. Since this default last changed very recently in #4203, I didn't mention this in the Changelog. As discussed in #4203 (comment) I initially kept the config closer to streampager's (see https://github.com/jj-vcs/jj/compare/main...ilyagr:jj:streamopts?expand=1), but then decided to make it more generic, smaller, and hopefully easier to understand.
This also changes the default to be closer to `less -FRX`. Since this default last changed very recently in jj-vcs#4203, I didn't mention this in the Changelog. As discussed in jj-vcs#4203 (comment)
This also changes the default to be closer to `less -FRX`. Since this default last changed very recently in jj-vcs#4203, I didn't mention this in the Changelog. As discussed in jj-vcs#4203 (comment)
This also changes the default to be closer to `less -FRX`. Since this default last changed very recently in jj-vcs#4203, I didn't mention this in the Changelog. As discussed in jj-vcs#4203 (comment)
…es (#1011) Summary: This could be considered as a bug report/feature request instead of a PR. 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). If there's a better way to achieve that than my approach here, I'd be happy to do that. 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`! :) Pull Request resolved: #1011 Reviewed By: quark-zju Differential Revision: D68191198 fbshipit-source-id: c1a180d8bf09a82f5439e2b32510c2f9eafc3d45
This also changes the default to be closer to `less -FRX`. Since this default last changed very recently in jj-vcs#4203, I didn't mention this in the Changelog. As discussed in jj-vcs#4203 (comment)
This also changes the default to be closer to `less -FRX`. Since this default last changed very recently in jj-vcs#4203, I didn't mention this in the Changelog. As discussed in jj-vcs#4203 (comment)
This also changes the default to be closer to `less -FRX`. Since this default last changed very recently in #4203, I didn't mention this in the Changelog. As discussed in #4203 (comment) I initially kept the config closer to streampager's (see https://github.com/jj-vcs/jj/compare/main...ilyagr:jj:streamopts?expand=1), but then decided to make it more generic, smaller, and hopefully easier to understand.
This also changes the default to be closer to `less -FRX`. Since this default last changed very recently in #4203, I didn't mention this in the Changelog. As discussed in #4203 (comment) I initially kept the config closer to streampager's (see https://github.com/jj-vcs/jj/compare/main...ilyagr:jj:streamopts?expand=1), but then decided to make it more generic, smaller, and hopefully easier to understand.
This also changes the default to be closer to `less -FRX`. Since this default last changed very recently in #4203, I didn't mention this in the Changelog. As discussed in #4203 (comment) I initially kept the config closer to streampager's (see https://github.com/jj-vcs/jj/compare/main...ilyagr:jj:streamopts?expand=1), but then decided to make it more generic, smaller, and hopefully easier to understand.
This also changes the default to be closer to `less -FRX`. Since this default last changed very recently in #4203, I didn't mention this in the Changelog. As discussed in #4203 (comment) I initially kept the config closer to streampager's (see https://github.com/jj-vcs/jj/compare/main...ilyagr:jj:streamopts?expand=1), but then decided to make it more generic, smaller, and hopefully easier to understand.
This also changes the default to be closer to `less -FRX`. Since this default last changed very recently in #4203, I didn't mention this in the Changelog. As discussed in #4203 (comment) I initially kept the config closer to streampager's (see https://github.com/jj-vcs/jj/compare/main...ilyagr:jj:streamopts?expand=1), but then decided to make it more generic, smaller, and hopefully easier to understand.
Checklist
If applicable:
CHANGELOG.md