Unofficial Julia interface for gat
- Install Julia
- Clone this repository
$ git clone https://github.com/terasakisatoshi/TerminalGat.jl.git
$ cd TerminalGat.jl
- Install terasakisatoshi/gat_jll.jl which is an autogenerated package constructed using BinaryBuilder.jl based on the original gat v0.17.0. Run the following commands:
$ julia
_
_ _ _(_)_ | Documentation: https://docs.julialang.org
(_) | (_) (_) |
_ _ _| |_ __ _ | Type "?" for help, "]?" for Pkg help.
| | | | | | |/ _` | |
| | |_| | | | (_| | | Version 1.10.3 (2024-04-30)
_/ |\__'_|_|_|\__'_| | Official https://julialang.org/ release
|__/ |
julia> using Pkg; Pkg.activate(".") # activate this project
julia> ] # switch to Pkg REPL
(TerminalGat) pkg> dev --local https://github.com/terasakisatoshi/gat_jll.jl.git
(TerminalGat) pkg> # press Ctrl+C to back to julian mode
julia> exit()
Our Julia package TerminalGat.jl
exports gat
, and gess
functions.
julia> using TerminalGat
julia> gat("Project.toml")
Internally, our package uses JuliaDocs/IOCapture.jl to capture the standard output generated by the go binary gat
.
If your terminal supports Sixel, you can print images.
julia> using TerminalGat
julia> using Plots; plot(sin); savefig("sin.png")
julia> gat("sin.png")
gess
works something like gat
+ less
:
julia> using TerminalGat
julia> gess("Project.toml")
Internally, our package uses ronisbr/TerminalPager.jl
to scroll through content that does not fit in the screen.