Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .vuepress/configs/sidebar/en.ts
Original file line number Diff line number Diff line change
Expand Up @@ -252,6 +252,7 @@ export const sidebarEn: SidebarConfig = {
'/lang-guide/chapters/strings_and_text.md',
'/lang-guide/chapters/helpers_and_debugging.md',
'/lang-guide/chapters/pipelines.md',
'/lang-guide/chapters/mime_types.md',
],
},
],
Expand Down
21 changes: 21 additions & 0 deletions lang-guide/chapters/mime_types.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# MIME Types for Nushell

[MIME types](https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types),
also known as media or content types, are used to identify data formats.
Since Nushell is not officially recognized by the _Internet Assigned Numbers
Authority (IANA)_, all Nushell MIME types are prefixed with "-x" to indicate
their unofficial status.
Despite this, some tools still rely on MIME types to identify data formats.

The three MIME types we define and recommend for consistent use are:

- **`application/x-nuscript`:**
This type is used for Nushell scripts and is similar to
`application/x-shellscript` for Bash scripts.
The "application" type is used because these scripts can be executable if the
correct shebang is included.
- **`text/x-nushell`:**
This is an alias for `application/x-nuscript` but emphasizes that the script
is human-readable, similar to `text/x-python`.
- **`application/x-nuon`:**
This type is used for the [NUON data format](../../book/loading_data.html#nuon).