Support `z -` in Nushell
This commit is contained in:
parent
535762b80a
commit
b0c899b99f
|
@ -42,8 +42,8 @@ jobs:
|
||||||
|
|
||||||
- name: Setup cache
|
- name: Setup cache
|
||||||
uses: Swatinem/rust-cache@v1
|
uses: Swatinem/rust-cache@v1
|
||||||
if:
|
with:
|
||||||
${{ matrix.os == 'windows-latest' }}
|
key: ${{ matrix.target }}
|
||||||
|
|
||||||
- run: cargo xtask ci
|
- run: cargo xtask ci
|
||||||
if: ${{ matrix.os == 'windows-latest' }}
|
if: ${{ matrix.os == 'windows-latest' }}
|
||||||
|
|
|
@ -71,6 +71,8 @@ jobs:
|
||||||
|
|
||||||
- name: Setup cache
|
- name: Setup cache
|
||||||
uses: Swatinem/rust-cache@v1
|
uses: Swatinem/rust-cache@v1
|
||||||
|
with:
|
||||||
|
key: ${{ matrix.target }}
|
||||||
|
|
||||||
- name: Build binary
|
- name: Build binary
|
||||||
uses: actions-rs/cargo@v1
|
uses: actions-rs/cargo@v1
|
||||||
|
|
|
@ -30,6 +30,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
||||||
- Bash/Fish/Posix/Zsh: paths on Cygwin.
|
- Bash/Fish/Posix/Zsh: paths on Cygwin.
|
||||||
- Fish: completions not working on certain systems.
|
- Fish: completions not working on certain systems.
|
||||||
- Bash: completions not escaping spaces correctly.
|
- Bash: completions not escaping spaces correctly.
|
||||||
|
- Nushell: support for `z -`.
|
||||||
|
|
||||||
## [0.8.1] - 2021-04-23
|
## [0.8.1] - 2021-04-23
|
||||||
|
|
||||||
|
|
|
@ -212,7 +212,7 @@ Now, add this to the end of your config file (find it by running
|
||||||
source ~/.zoxide.nu
|
source ~/.zoxide.nu
|
||||||
```
|
```
|
||||||
|
|
||||||
Note: zoxide only supports Nushell v0.61.0 and above.
|
Note: zoxide only supports Nushell v0.62.0 and above.
|
||||||
|
|
||||||
</details>
|
</details>
|
||||||
|
|
||||||
|
|
|
@ -45,7 +45,7 @@ Now, add this to the end 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.61.0 and above.
|
Note: zoxide only supports Nushell v0.62.0 and above.
|
||||||
.TP
|
.TP
|
||||||
.B powershell
|
.B powershell
|
||||||
Add this to your configuration (find it by running \fBecho $profile\fR in
|
Add this to your configuration (find it by running \fBecho $profile\fR in
|
||||||
|
|
|
@ -44,7 +44,7 @@ echo "zoxide: PWD hooks are not supported on Nushell.\nUse `zoxide init nushell
|
||||||
def-env __zoxide_z [...rest:string] {
|
def-env __zoxide_z [...rest:string] {
|
||||||
# `z -` does not work yet, see https://github.com/nushell/nushell/issues/4769
|
# `z -` does not work yet, see https://github.com/nushell/nushell/issues/4769
|
||||||
let arg0 = ($rest | append '~').0
|
let arg0 = ($rest | append '~').0
|
||||||
let path = if ($rest | length) <= 1 && ($arg0 | path expand | path type) == dir {
|
let path = if (($rest | length) <= 1) && ($arg0 == '-' || ($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")
|
||||||
|
@ -89,4 +89,4 @@ alias {{cmd}}i = __zoxide_zi
|
||||||
#
|
#
|
||||||
# source ~/.zoxide.nu
|
# source ~/.zoxide.nu
|
||||||
#
|
#
|
||||||
# Note: zoxide only supports Nushell v0.61.0 and above.
|
# Note: zoxide only supports Nushell v0.62.0 and above.
|
||||||
|
|
Loading…
Reference in New Issue