Last week, I announced the package TerminalPager.jl here. It is targeting a missing feature that would make analysis of data and documentation reading a little bit easier. If you have to print something on the screen larger than the terminal (a table for example), then it will be cropped. Algorithms to crop tables are very difficult to implement and you will always miss something. Hence, TerminalPager.jl is trying to be an implementation of Linux’s
less command inside Julia.
I just released v0.1.0 that is the first “usable” version (it should be available within some minutes). In this new release, we have the following new features:
We can now freeze rows and columns (as requested by @rafael.guerra and @jacobadenbaum). The number of frozen columns and rows can be specified as a keyword when calling
pager of by typing
f and inputing new values:
There is now a searching mechanism that can be called by typing
/ (just as in Vim / Neovim, the best editor out there ). Then, you write a regex and every match will be highlighted. The first one is active, and the active match can be changed using
n (forward) or
N (backward). When the match is changed, the display moves to show it.
It turns out that the help screen of TerminalPager.jl was not being handle as the input string, leading to the same cropping we want to solve by creating the package This is fixed now, help is printed using the same algorithm as the input string:
I defined actions and those actions are related to key codes. Hence, you can change any key code or add new ones using the function
If you want to try:
julia> ]add TerminalPager julia> using TerminalPager julia> rand(100, 100) |> pager
My next step will be creating tests to increase the coverage of the package and the documentation. I appreciate help to find bugs, because there will be a lot Notice that this version are not very well debugged to work in edge cases (like, very small screens, with wrong input values, strange ANSI escape sequences, etc.). Hence, expect some problems.
I also was not able to test it in Windows (only Linux and macOS). I appreciate feedback and help here, it will be difficult to make everything run smoothly in different platforms.