Home Explore Blog CI



nushell

4th chunk of `book/quick_tour.md`
e9269ccd91a94d57efe1adbc4e239184852c979db981eb8c0000000100000ea0
The first three lines are the same commands we used in the second example above, so let's examine the last three:

4. The [`first` command](/commands/docs/first.md) simply returns the first value from the table. In this case, that means the file with the largest size. That's the `Cargo.lock` file if using the directory listing from the second example above. This "file" is a [`record`](./types_of_data.md#records) from the table which still contains its `name`, `type`, `size`, and `modified` columns/fields.
5. `get name` returns the _value_ of the `name` field from the previous command, so `"Cargo.lock"` (a string). This is also a simple example of a [`cell-path`](./types_of_data.md#cell-paths) that can be used to navigate and isolate structured data.
6. The last line uses the `$in` variable to reference the output of line 5. The result is a command that says _"Copy 'Cargo.lock' to the home directory"_

::: tip
[`get`](/commands/docs/get.md) and its counterpart [`select`](/commands/docs/select.md) are two of the most used filters in Nushell, but it might not be easy to
spot the difference between them at first glance. When you're ready to start using them more extensively, see [Using `get` and `select`](./navigating_structured_data.md#using-get-and-select) for a guide.
:::

## Getting Help

Nushell provides an extensive, in-shell Help system. For example

```nu
# help <command>
help ls
# Or
ls --help
# Also
help operators
help escapes
```

::: tip Cool!
Press the <kbd>F1</kbd> key to access the Help [menu](./line_editor.md#menus). Search for the `ps` command here, but _don't press <kbd>Enter</kbd> just yet_!

Instead, press the <kbd>Down Arrow</kbd> key, and notice that you are scrolling through the Examples section. Highlight an example, _then_ press <kbd>Enter</kbd> and
the example will be entered at the commandline, ready to run!

This can be a great way to explore and learn about the extensive set of Nushell commands.
:::

The Help system also has a "search" feature:

```nu
help --find filesize
# or
help -f filesize
```

It may not surprise you by now that the Help system itself is based on structured data! Notice that the output of `help -f filesize` is a table.

The Help for each command is stored as a record with the:

- Name
- Category
- Type (built-in, plugin, custom)
- Parameters it accepts
- Signatures showing what types of data it can accept as well as output
- And more

You can view _all_ commands (other than externals) as a single large table using:

```nu
help commands
```

::: tip
Notice that the `params` and `input_output` columns of the output above are _nested_ tables. Nushell allows [arbitrarily nested data structures](./navigating_structured_data.md#background).
:::

## `explore`'ing from Here

That `help commands` output is quite long. You could send it to a pager like `less` or `bat`, but Nushell includes a built-in `explore` command that lets you not only scroll, but also telescope-in to nested data. Try:

```nu
help commands | explore
```

Then press the <kbd>Enter</kbd> key to access the data itself. Use the arrow keys to scroll to the `cp` command, and over to the `params` column. Hit <kbd>Enter</kbd> again to
telescope in to the complete list of parameters available to the `cp` command.

::: note
Pressing <kbd>Esc</kbd> one time returns from Scroll-mode to the View; Pressing it a second time returns to the previous view (or exits, if already at the top view level).
:::

::: tip
You can, of course, use the `explore` command on _any_ structured data in Nushell. This might include JSON data coming from a Web API, a spreadsheet or CSV file, YAML, or anything that can be represented as structured data in Nushell.

Try `$env.config | explore` for fun!
:::

Title: Nushell's Help System and the 'explore' Command
Summary
This section details Nushell's help system, accessible via `help <command>` or `<command> --help`. It demonstrates how to use the help menu (F1 key), search for specific terms (`help --find`), and view command information as structured data. It introduces the `explore` command for navigating nested data structures, using the output of `help commands` as an example. It also mentions the versatility of the `explore` command when used with other forms of structured data.