Home Explore Blog CI



nushell

11th chunk of `blog/2019-08-23-introducing-nushell.md`
315c955245e4c045daac989ed56bbc06d2af5de6948f33b20000000100000671


You might wonder how does that even work. Nu has a metadata system (still early!) that you can read about in the [Metadata chapter](https://book.nushell.sh/en/metadata) of the [Nu book](https://book.nushell.sh). Let's just take a quick peek at it:

```
> open Cargo.toml
------------+--------------+------------------+----------+----------
 bin        | dependencies | dev-dependencies | lib      | package
------------+--------------+------------------+----------+----------
 [11 items] | [object]     | [object]         | [object] | [object]
------------+--------------+------------------+----------+----------
> open Cargo.toml | tags
----------+------------------------------------------
 span     | origin
----------+------------------------------------------
 [object] | /home/sophia/Source/nushell/Cargo.toml
----------+------------------------------------------
```

Data that flows through the pipeline gets a set of additional metadata tagged to it. We can use this later to figure out how to display the contents, show a better error message, and more.

# Shells, plural

Let's say you're in a directory, but you'd really like to flip back and forth between it and one or two others. You could open up multiple tabs, multiple terminals, if you're on a Unix system you could use "screen", and probably even more than that. What if the shells were just built in?

In Nu, we can `enter` a directory, which adds it to a ring of shells we can bounce between:

```
> enter ../rhai/
/home/sophia/Source/rhai(master)> shells
---+---+------------+-----------------------------

Title: Nu's Metadata System and Shell Management
Summary
Nu has a metadata system that tags data flowing through pipelines, enabling better error messages and content display. Nu also supports built-in shell management, allowing users to 'enter' directories and quickly switch between them using the 'shells' command.