Skip to content

Commit a27c1bb

Browse files
authored
added section talking about the used mime types for nushell (#1556)
1 parent 665d027 commit a27c1bb

File tree

2 files changed

+22
-0
lines changed

2 files changed

+22
-0
lines changed

.vuepress/configs/sidebar/en.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -252,6 +252,7 @@ export const sidebarEn: SidebarConfig = {
252252
'/lang-guide/chapters/strings_and_text.md',
253253
'/lang-guide/chapters/helpers_and_debugging.md',
254254
'/lang-guide/chapters/pipelines.md',
255+
'/lang-guide/chapters/mime_types.md',
255256
],
256257
},
257258
],

lang-guide/chapters/mime_types.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# MIME Types for Nushell
2+
3+
[MIME types](https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types),
4+
also known as media or content types, are used to identify data formats.
5+
Since Nushell is not officially recognized by the _Internet Assigned Numbers
6+
Authority (IANA)_, all Nushell MIME types are prefixed with "-x" to indicate
7+
their unofficial status.
8+
Despite this, some tools still rely on MIME types to identify data formats.
9+
10+
The three MIME types we define and recommend for consistent use are:
11+
12+
- **`application/x-nuscript`:**
13+
This type is used for Nushell scripts and is similar to
14+
`application/x-shellscript` for Bash scripts.
15+
The "application" type is used because these scripts can be executable if the
16+
correct shebang is included.
17+
- **`text/x-nushell`:**
18+
This is an alias for `application/x-nuscript` but emphasizes that the script
19+
is human-readable, similar to `text/x-python`.
20+
- **`application/x-nuon`:**
21+
This type is used for the [NUON data format](../../book/loading_data.html#nuon).

0 commit comments

Comments
 (0)