You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
excerpt: Today, we're releasing version 0.93.0 of Nu. This release adds...
7
7
---
8
+
8
9
<!-- TODO: complete the excerpt above -->
9
10
10
11
# Nushell 0.93.0
11
12
12
13
Nushell, or Nu for short, is a new shell that takes a modern, structured approach to your command line. It works seamlessly with the data from your filesystem, operating system, and a growing number of file formats to make it easy to build powerful command line pipelines.
13
14
14
15
<!-- TODO: write this excerpt -->
16
+
15
17
Today, we're releasing version 0.93.0 of Nu. This release adds...
16
18
17
19
# Where to get it
@@ -99,7 +101,7 @@ We now have two commands to replace `register` that break this functionality int
99
101
The previous example would now be equivalent to this, at the REPL:
100
102
101
103
```nushell
102
-
# Add the plugin's commands to your plugin cache file:
104
+
# Add the plugin's commands to your plugin registry file:
103
105
> plugin add ~/.cargo/bin/nu_plugin_gstat
104
106
105
107
# Load it into scope:
@@ -108,37 +110,38 @@ The previous example would now be equivalent to this, at the REPL:
108
110
109
111
Note that this _will not_ work in a script in this order, as `plugin use` is a [parser command](/book/thinking_in_nu.md#think-of-nushell-as-a-compiled-language) and would get evaluated first. If you would like to make sure a certain plugin is available in a script, there are a few options:
110
112
111
-
1. Prepare a plugin cache file in advance, and use `--plugin-config` with `plugin use`:
112
-
```nushell
113
-
plugin use --plugin-config /path/to/custom.msgpackz your_required_plugin
114
-
```
113
+
1. Prepare a plugin registry file in advance, and use `--plugin-config` with `plugin use`:
114
+
```nushell
115
+
plugin use --plugin-config /path/to/custom.msgpackz your_required_plugin
116
+
```
115
117
2. The same thing, but pass the `plugin config` to `nu`:
116
-
```nushell
117
-
nu --plugin-config /path/to/custom.msgpackz your-script.nu
118
-
```
119
-
3. Pass a NUON list to `--plugins` (new in 0.93) to `nu`, to use plugins without a cache file:
120
-
```nushell
121
-
nu --plugins '[/path/to/nu_plugin_your_required_plugin]' your-script.nu
122
-
123
-
# or you can use `to nuon` from inside nu:
124
-
let plugins = [
125
-
'/path/to/nu_plugin_foo'
126
-
'/path/to/nu_plugin_bar'
127
-
]
128
-
nu --plugins ($plugins | to nuon) your-script.nu
129
-
```
118
+
```nushell
119
+
nu --plugin-config /path/to/custom.msgpackz your-script.nu
120
+
```
121
+
3. Pass a NUON list to `--plugins` (new in 0.93) to `nu`, to use plugins without a registry file:
122
+
123
+
```nushell
124
+
nu --plugins '[/path/to/nu_plugin_your_required_plugin]' your-script.nu
130
125
131
-
The last option will run the plugin to get signatures at startup, without modifying the user's cache file, and can even be used when `--no-config-file` is specified.
126
+
# or you can use `to nuon` from inside nu:
127
+
let plugins = [
128
+
'/path/to/nu_plugin_foo'
129
+
'/path/to/nu_plugin_bar'
130
+
]
131
+
nu --plugins ($plugins | to nuon) your-script.nu
132
+
```
132
133
133
-
Finally, we have also added [`plugin rm`](#plugin-rm-toc), which removes a plugin from the cache file. This was something that previously needed to be done manually in a text editor, but is made possible by the new format.
134
+
The last option will run the plugin to get signatures at startup, without modifying the user's registry file, and can even be used when `--no-config-file`is specified.
134
135
135
-
## New plugin cache format [[toc](#table-of-content)]
136
+
Finally, we have also added [`plugin rm`](#plugin-rm-toc), which removes a plugin from the registry file. This was something that previously needed to be done manually in a text editor, but is made possible by the new format.
137
+
138
+
## New plugin registry format [[toc](#table-of-content)]
136
139
137
140
::: warning Breaking change
138
141
See a full overview of the [breaking changes](#breaking-changes)
139
142
:::
140
143
141
-
The plugin cache format has been changed from the previous Nushell script format (containing a sequence of `register` commands) to a custom, declarative format based on [MessagePack](https://msgpack.org/) compressed with [brotli](https://github.com/google/brotli). This new format is called `msgpackz`, and the default plugin file is `plugin.msgpackz` instead of `plugin.nu`.
144
+
The plugin registry format has been changed from the previous Nushell script format (containing a sequence of `register` commands) to a custom, declarative format based on [MessagePack](https://msgpack.org/) compressed with [brotli](https://github.com/google/brotli). This new format is called `msgpackz`, and the default plugin file is `plugin.msgpackz` instead of `plugin.nu`.
142
145
143
146
Your existing `plugin.nu` file will be automatically upgraded to `plugin.msgpackz` the first time version 0.93 runs.
144
147
@@ -157,7 +160,7 @@ The most significantly _breaking_ part of this breaking change is that the follo
157
160
source $nu.plugin-file
158
161
```
159
162
160
-
You can use the [`plugin use`](#plugin-use-toc) command instead to (re-)load a specific plugin from the plugin cache file:
163
+
You can use the [`plugin use`](#plugin-use-toc) command instead to (re-)load a specific plugin from the plugin registry file:
161
164
162
165
```nushell
163
166
> plugin use gstat
@@ -172,32 +175,36 @@ This frees up stdio for interaction with the user's terminal, which makes plugin
172
175
We also added [engine calls](/contributor-book/plugin_protocol_reference.md#enterforeground-engine-call) for moving the plugin into the terminal controlling (foreground) process group, mainly for Unix platforms. This was also necessary to fully support terminal UI plugins, after the last release's new persistence functionality caused plugins to run in a new, background process group by default.
173
176
174
177
## Hall of fame [[toc](#table-of-content)]
178
+
175
179
### Bug fixes [[toc](#table-of-content)]
180
+
176
181
Thanks to all the contributors below for helping us solve issues and bugs :pray:
Removes a plugin from the plugin cache file (default `$nu.plugin-path`).
221
+
Removes a plugin from the plugin registry file (default `$nu.plugin-path`).
215
222
216
223
```nushell
217
224
plugin rm gstat
@@ -222,11 +229,12 @@ The commands will still remain in scope, but will not be present the next time `
222
229
223
230
#### `plugin use`[[toc](#table-of-content)]
224
231
225
-
Loads a plugin from the plugin cache file (default `$nu.plugin-path`) **at parse time**.
232
+
Loads a plugin from the plugin registry file (default `$nu.plugin-path`) **at parse time**.
226
233
227
-
This replaces the other part of `register` - actually adding the commands to scope. It does not run the plugin executable, though, it just loads the [previously added](#plugin-add-toc) commands from the cache file.
234
+
This replaces the other part of `register` - actually adding the commands to scope. It does not run the plugin executable, though, it just loads the [previously added](#plugin-add-toc) commands from the registry file.
228
235
229
236
### Changes to existing commands [[toc](#table-of-content)]
0 commit comments