Skip to content

Commit a9b1c82

Browse files
authored
Add note about breaking completions change (#1850)
1 parent d5d4afd commit a9b1c82

File tree

1 file changed

+31
-0
lines changed

1 file changed

+31
-0
lines changed

blog/2025-03-18-nushell_0_103_0.md

+31
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ As part of this release, we also publish a set of [optional plugins](https://www
4646
- [_`PROMPT_\*` environment variables are no longer inherited\_](#prompt-environment-variables-are-no-longer-inherited-toc)
4747
- [_Closure serialization changes_](#closure-serialization-changes-toc)
4848
- [_Filesize unit formatting_](#filesize-unit-formatting-toc)
49+
- [_External completers are no longer used for internal commands_](#external-completers-are-no-longer-used-for-internal-commands-toc)
4950
- [_Removals_](#removals-toc)
5051
- [_`range`_](#range-toc)
5152
- [_`into bits`_](#into-bits-toc)
@@ -315,6 +316,36 @@ option with all of these commands, in which case a string-representation of the
315316

316317
When setting a specific filesize unit via `$env.config.filesize.unit`, sizes will now be formatted using the default locale (e.g., separators and decimals). This returns a similar 0.98 behavior.
317318

319+
### External completers are no longer used for internal commands [[toc](#table-of-contents)]
320+
321+
Prior to [#15086](https://github.com/nushell/nushell/pull/15086), internal commands (including custom commands and aliases) without [custom completions](https://www.nushell.sh/book/custom_completions.html#custom-completions) would fall back to the external completer. After this PR, internal commands will not use the external completer.
322+
323+
::: tip Note
324+
The zoxide completer previously listed in the cookbook relied on this functionality. To update your zoxide completer to be compatible, you can (optionally) remove your external zoxide completer, add this to your config:
325+
326+
```nu
327+
def "nu-complete zoxide path" [context: string] {
328+
let parts = $context | split row " " | skip 1
329+
{
330+
options: {
331+
sort: false
332+
completion_algorithm: prefix
333+
positional: false
334+
case_sensitive: false
335+
}
336+
completions: (zoxide query --list --exclude $env.PWD -- ...$parts | lines)
337+
}
338+
}
339+
340+
def --env --wrapped z [...rest: string@"nu-complete zoxide path"] {
341+
__zoxide_z ...$rest
342+
}
343+
```
344+
345+
Note, if your zoxide configuration from `zoxide init` is in a vendor autoload, you should also add the above snippet to either a vendor autoload or user autoload, so that the `__zoxide_z` command is defined.
346+
347+
:::
348+
318349
## Removals [[toc](#table-of-contents)]
319350

320351
### `range` [[toc](#table-of-contents)]

0 commit comments

Comments
 (0)