Commands that interact with types
The main type inspector in Nu is the describe command that takes any data type on input and reports its type signature.
E.g.
[foo bar baz] | describe
# => list<string>Commands
describedescribe --detailed(-d) also shows the type of every nested value.
inspecthelpinto (subcommands)- The into commands are used to cast one type into another.
into valueconverts a custom value (for example asemveror amatrix) into a regular Nushell value.
detect typeInfers a type from a string:
"42" | detect type | describe # => intDurations written with units, including several units in a row, are detected too:
"1hr 3min" | detect type | describe # => duration
ast- In the branches of abstract syntax tree that describe the type of some element