rust-pager
Yet another pager in Rust
Features
- Vim like keybindings
- Search substring
- Mouse wheel support
Install
cargo install rust-pager
Usage
<command> | rp
or
rp <path>
Category: Rust / HTTP Client |
Watchers: 1 |
Star: 14 |
Fork: 3 |
Last update: Sep 22, 2021 |
I did manage to get rp
working with process substitution, and it's a pretty nice pager without any of the bulk that comes with less
. Scrolling is a bit choppy and slow with iTerm2 though, unfortunately:
https://user-images.githubusercontent.com/32112321/112741008-983be480-8f36-11eb-9e3b-3e0b17939662.mov
This fixes the slowdown that occurs when scrolling with a trackpad. Closes #6.
The basic features work well. :+1:
I tried rp
after setting it as the default pager, but it is not compatible.
PAGER=rp
bat <file.name>
Pager is less
Pager is rp
Especially the problem is that the layout of the emulator is completely broken after running bat
.
After entering /
, press <Backspace>
to clear the search term, but it does not work.
rust-pager
doesn't appear to be able to read from stdin on MacOS.
$ ls . | rp
Error: IoError(Custom { kind: Other, error: "Failed to initialize input reader" })
It does work perfectly fine with process substitution, however:
$ rp <(ls .)
[pager contents...]
Version: rp 0.1.0
Platform: macOS 10.14.6 (Darwin 18.7.0)
Compiler: rustc 1.49.0 (x86_64-apple-darwin)