Skip to content

Commit

Permalink
Document that open looks up froms in scope (#1048)
Browse files Browse the repository at this point in the history
That we check for the extension and then look up the matching `from` subcommand has been an open secret used by plugin authors. Let's document it.
  • Loading branch information
sholderbach committed Sep 6, 2023
1 parent 86bb65b commit f4bc4c9
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions book/loading_data.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,11 @@ Nu currently supports the following formats for loading data directly into table
- xml
- yaml / yml

::: tip Did you know?
Under the hood `open` will look for a `from ...` subcommand in your scope which matches the extension of your file.
You can thus simply extend the set of supported file types of `open` by creating your own `from ...` subcommand.
:::

But what happens if you load a text file that isn't one of these? Let's try it:

```
Expand Down

0 comments on commit f4bc4c9

Please sign in to comment.