Skip to content

Commit f32dc6b

Browse files
authored
Update nushell template to use rest operator where needed (#663)
1 parent c8dda80 commit f32dc6b

File tree

4 files changed

+6
-6
lines changed

4 files changed

+6
-6
lines changed

CHANGELOG.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1111

1212
### Added
1313

14-
- Nushell: support for v0.86.0.
14+
- Nushell: support for v0.89.0.
1515

1616
## [0.9.2] - 2023-08-04
1717

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -243,7 +243,7 @@ zoxide can be installed in 4 easy steps:
243243
> ```
244244
>
245245
> **Note**
246-
> zoxide only supports Nushell v0.86.0+.
246+
> zoxide only supports Nushell v0.89.0+.
247247
248248
</details>
249249

man/man1/zoxide-init.1

+1-1
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ Now, add this to the \fBend\fR of your config file (find it by running
4545
\fBsource ~/.zoxide.nu\fR
4646
.fi
4747
.sp
48-
Note: zoxide only supports Nushell v0.86.0+.
48+
Note: zoxide only supports Nushell v0.89.0+.
4949
.TP
5050
.B powershell
5151
Add this to the \fBend\fR of your config file (find it by running \fBecho

templates/nushell.txt

+3-3
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ def --env __zoxide_z [...rest:string] {
4444
let path = if (($rest | length) <= 1) and ($arg0 == '-' or ($arg0 | path expand | path type) == dir) {
4545
$arg0
4646
} else {
47-
(zoxide query --exclude $env.PWD -- $rest | str trim -r -c "\n")
47+
(zoxide query --exclude $env.PWD -- ...$rest | str trim -r -c "\n")
4848
}
4949
cd $path
5050
{%- if echo %}
@@ -54,7 +54,7 @@ def --env __zoxide_z [...rest:string] {
5454

5555
# Jump to a directory using interactive search.
5656
def --env __zoxide_zi [...rest:string] {
57-
cd $'(zoxide query --interactive -- $rest | str trim -r -c "\n")'
57+
cd $'(zoxide query --interactive -- ...$rest | str trim -r -c "\n")'
5858
{%- if echo %}
5959
echo $env.PWD
6060
{%- endif %}
@@ -86,4 +86,4 @@ alias {{cmd}}i = __zoxide_zi
8686
#
8787
# source ~/.zoxide.nu
8888
#
89-
# Note: zoxide only supports Nushell v0.86.0+.
89+
# Note: zoxide only supports Nushell v0.89.0+.

0 commit comments

Comments
 (0)