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>
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
enhancementThe 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
.
Fix #7
Note that highlighting doesn't work well when cross other styles it need more hard works and hurt performance I think that's not very important feature yet
This fix prevents unnecessary redraws and improves the experience when scrolling.
Prior to this fix, whenever you used a fast scroll wheel (e.g. trackpad scrolling) and scrolled above the beginning or past the end, rp
would unnecessarily redraw the screen with every scroll event received. This would often result in waiting 15 seconds for rp
to catch up to the stream of incoming events.
https://gist.github.com/sudojunior/1ebdc489ebf9eb86f5f32b50c459ac4a
In less, you can press h
to view the same screen.
For example, page switching is possible with f
and b
.
It seems that some Emacs's keymaps are also supported. (C-n
, C-p
, C-v
, ...)
When trying to search through a file with colors, rp
can't search across colors.
In the above screenshot, the string use crate::less
is not found in the syntax-highlighted file.
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)
Overview this project is inspired by https://github.com/poppycompass/asmshell Preview Build from source git clone https://github.com/keystone-engine/k
Ballista: Distributed Compute Platform Overview Ballista is a distributed compute platform primarily implemented in Rust, powered by Apache Arrow. It
BoringTun BoringTun is an implementation of the WireGuard® protocol designed for portability and speed. BoringTun is successfully deployed on millions
Drill Drill is a HTTP load testing application written in Rust. The main goal for this project is to build a really lightweight tool as alternative to
Herd Herd was a small side project in building a HTTP load testing application in Rust with a main focus on being easy to use and low on OS level depe
Flowgger is a fast, simple and lightweight data collector written in Rust. It reads log entries over a given protocol, extracts them, decodes them usi
kytan: High Performance Peer-to-Peer VPN kytan is a high performance peer to peer VPN written in Rust. The goal is to to minimize the hassle of config
This repo contains the transparent proxy component of Linkerd2. While the Linkerd2 proxy is heavily influenced by the Linkerd 1.X proxy, it comprises
Weld Full fake REST API generator. This project is heavily inspired by json-server, written with rust. Synopsis Our first aim is to generate a fake ap
Wez's Terminal A GPU-accelerated cross-platform terminal emulator and multiplexer written by @wez and implemented in Rust User facing docs and guide a
rspb rust fork of ptpb/pb TL;DR Create a new paste from the output of cmd: cmd | curl -F c=@- https://pb.mgt.moe/ Usage Creating pastes > echo hi | c
libretranslate-rs A LibreTranslate API for Rust. libretranslate = "0.2.4" libretranslate allows you to use open source machine translation in your pr
City17 A Rust serverless function to retrieve and relay a playlist for Twitch livestreams/VODs. By running this in specific countries and using a brow
Agreed Fork of async-raft, the Tokio-based Rust implementation of the Raft distributed consensus protocol. Agreed is an implementation of the Raft con
Rust Rust runtime for Vercel Functions. Community-maintained package to support using Rust inside Vercel Functions as a Runtime. Usage First, you'll n
Get Started Install delta and add this to your ~/.gitconfig: [core] pager = delta [interactive] diffFilter = delta --color-only [delta]
funzzy Yet another fancy watcher. (Inspired by antr / entr) Configure execution of different commands using semantic yaml. # .watch.yaml # list here a
YATA Yet Another Technical Analysis library YaTa implements most common technical analysis methods and indicators. It also provides you an interface t
Should we start to worry? bytes-buf feature can produce SIGILL. avx and sse flags are in almost all cpus of x86 and x86_64 architectures. More details
Trojan-rust Yet another trojan-gfw implementation in Rust. Features Server mode only (for now). Supports Redis auth & flow stat. Uses OpenSSL as crypt