Jless as less for jq json data
Since forever I have some variations of this:
function lq
command jq . "$argv" -C | less -r
end
jless - A Command-Line JSON Viewer is this, but much better. Intuitive CLI viewer for json data, works seamlessly for large JSONs (which sometimes breaks my lq
command, especially for large lines)
Now:
function lq
echo "not again, Serhii!!! Use jless/jl"
command jless -r -m line "$argv"
# command jq . "$argv" -C | less -r
end
Jless
m
toggles the mode between line-mode (jq-like) and the (default) data mode-r
does relative numbers!-N
disables any line numbersh
opens the help, the usual vim things do what I expectH
focuses the parent
- Yank/copy (all below can be
pX
to just print the value)yy
!!! copy the value, including"
yk
copy the KEY under cursoryp
copy the path from root to current object
It does yaml as well!
Nel mezzo del deserto posso dire tutto quello che voglio.
comments powered by Disqus