[Short Tip] Get data type in Nushell

Nushell supports multiple data types. If you get lost what exact data type you are working with just right now, the describe command can help:

❯ echo 1 | describe
integer

❯ echo "1" | describe
string

Unfortunately right now it does not support structured data types like “list” or “table”. Hopefully that will be added in the future:

❯ echo [a b c] | describe
───┬─────────────────────
 0 │ string 
 1 │ string 
 2 │ string 
───┴─────────────────────

Image by BRRT from Pixabay

Advertisement

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: