Update nushell template to use rest operator where needed (#663)
This commit is contained in:
parent
c8dda80716
commit
f32dc6bcd8
|
@ -11,7 +11,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
||||||
|
|
||||||
### Added
|
### Added
|
||||||
|
|
||||||
- Nushell: support for v0.86.0.
|
- Nushell: support for v0.89.0.
|
||||||
|
|
||||||
## [0.9.2] - 2023-08-04
|
## [0.9.2] - 2023-08-04
|
||||||
|
|
||||||
|
|
|
@ -243,7 +243,7 @@ zoxide can be installed in 4 easy steps:
|
||||||
> ```
|
> ```
|
||||||
>
|
>
|
||||||
> **Note**
|
> **Note**
|
||||||
> zoxide only supports Nushell v0.86.0+.
|
> zoxide only supports Nushell v0.89.0+.
|
||||||
|
|
||||||
</details>
|
</details>
|
||||||
|
|
||||||
|
|
|
@ -45,7 +45,7 @@ Now, add this to the \fBend\fR of your config file (find it by running
|
||||||
\fBsource ~/.zoxide.nu\fR
|
\fBsource ~/.zoxide.nu\fR
|
||||||
.fi
|
.fi
|
||||||
.sp
|
.sp
|
||||||
Note: zoxide only supports Nushell v0.86.0+.
|
Note: zoxide only supports Nushell v0.89.0+.
|
||||||
.TP
|
.TP
|
||||||
.B powershell
|
.B powershell
|
||||||
Add this to the \fBend\fR of your config file (find it by running \fBecho
|
Add this to the \fBend\fR of your config file (find it by running \fBecho
|
||||||
|
|
|
@ -44,7 +44,7 @@ def --env __zoxide_z [...rest:string] {
|
||||||
let path = if (($rest | length) <= 1) and ($arg0 == '-' or ($arg0 | path expand | path type) == dir) {
|
let path = if (($rest | length) <= 1) and ($arg0 == '-' or ($arg0 | path expand | path type) == dir) {
|
||||||
$arg0
|
$arg0
|
||||||
} else {
|
} else {
|
||||||
(zoxide query --exclude $env.PWD -- $rest | str trim -r -c "\n")
|
(zoxide query --exclude $env.PWD -- ...$rest | str trim -r -c "\n")
|
||||||
}
|
}
|
||||||
cd $path
|
cd $path
|
||||||
{%- if echo %}
|
{%- if echo %}
|
||||||
|
@ -54,7 +54,7 @@ def --env __zoxide_z [...rest:string] {
|
||||||
|
|
||||||
# Jump to a directory using interactive search.
|
# Jump to a directory using interactive search.
|
||||||
def --env __zoxide_zi [...rest:string] {
|
def --env __zoxide_zi [...rest:string] {
|
||||||
cd $'(zoxide query --interactive -- $rest | str trim -r -c "\n")'
|
cd $'(zoxide query --interactive -- ...$rest | str trim -r -c "\n")'
|
||||||
{%- if echo %}
|
{%- if echo %}
|
||||||
echo $env.PWD
|
echo $env.PWD
|
||||||
{%- endif %}
|
{%- endif %}
|
||||||
|
@ -86,4 +86,4 @@ alias {{cmd}}i = __zoxide_zi
|
||||||
#
|
#
|
||||||
# source ~/.zoxide.nu
|
# source ~/.zoxide.nu
|
||||||
#
|
#
|
||||||
# Note: zoxide only supports Nushell v0.86.0+.
|
# Note: zoxide only supports Nushell v0.89.0+.
|
||||||
|
|
Loading…
Reference in New Issue