π©βπ TIL More About a Brand Nushell
I know about nushell for quite a while. Today I installed nushell
and gave it a try.
I thoroughly enjoy the hard break with traditional shells. “Everything is data”, the website claims.
And this brings up a couple of interesting use cases. nushell
supports json (along with a whole lot of other formats) out of the box,
and also includes a http client. This makes nushell
a perfect fit for browsing json APIs from the command line.
However, there are a bunch of other really interesting use cases. Tools like iproute2
or lsblk
allow to output json.
We list all devices in json format and tell nushell
to interpret it as json.
lsblk -J | from json

Running lsblk
We want to drill into the small nested box with root included.
lsblk -J | from json | get blockdevices.children.0.4.children.0

Running lsblk and delve deep into the data

How to delve into the data
An absolute great tool to dive into data π
You even can tell nushell
to output in any known format. For example | to md
prints a markdown table.
I think I will find plenty of places where nushell
will help me!