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
mtoggles the mode between line-mode (jq-like) and the (default) data mode-rdoes relative numbers!-Ndisables any line numbershopens the help, the usual vim things do what I expectHfocuses the parent
- Yank/copy (all below can be
pXto just print the value)yy!!! copy the value, including"ykcopy the KEY under cursorypcopy 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