diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 4d7480a..5ffd4af 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -42,8 +42,8 @@ jobs: - name: Setup cache uses: Swatinem/rust-cache@v1 - if: - ${{ matrix.os == 'windows-latest' }} + with: + key: ${{ matrix.target }} - run: cargo xtask ci if: ${{ matrix.os == 'windows-latest' }} diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 2894bf7..ca0dddc 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -71,6 +71,8 @@ jobs: - name: Setup cache uses: Swatinem/rust-cache@v1 + with: + key: ${{ matrix.target }} - name: Build binary uses: actions-rs/cargo@v1 diff --git a/CHANGELOG.md b/CHANGELOG.md index e554320..8a3ad93 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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. - Fish: completions not working on certain systems. - Bash: completions not escaping spaces correctly. +- Nushell: support for `z -`. ## [0.8.1] - 2021-04-23 diff --git a/README.md b/README.md index 5a87dd7..542b380 100644 --- a/README.md +++ b/README.md @@ -212,7 +212,7 @@ Now, add this to the end of your config file (find it by running source ~/.zoxide.nu ``` -Note: zoxide only supports Nushell v0.61.0 and above. +Note: zoxide only supports Nushell v0.62.0 and above. diff --git a/man/man1/zoxide-init.1 b/man/man1/zoxide-init.1 index a655e8f..0241b41 100644 --- a/man/man1/zoxide-init.1 +++ b/man/man1/zoxide-init.1 @@ -45,7 +45,7 @@ Now, add this to the end of your config file (find it by running \fBsource ~/.zoxide.nu\fR .fi .sp -Note: zoxide only supports Nushell v0.61.0 and above. +Note: zoxide only supports Nushell v0.62.0 and above. .TP .B powershell Add this to your configuration (find it by running \fBecho $profile\fR in diff --git a/templates/nushell.txt b/templates/nushell.txt index 15d2ae0..b21f9cf 100644 --- a/templates/nushell.txt +++ b/templates/nushell.txt @@ -44,7 +44,7 @@ echo "zoxide: PWD hooks are not supported on Nushell.\nUse `zoxide init nushell def-env __zoxide_z [...rest:string] { # `z -` does not work yet, see https://github.com/nushell/nushell/issues/4769 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 } else { (zoxide query --exclude $env.PWD -- $rest | str trim -r -c "\n") @@ -89,4 +89,4 @@ alias {{cmd}}i = __zoxide_zi # # source ~/.zoxide.nu # -# Note: zoxide only supports Nushell v0.61.0 and above. +# Note: zoxide only supports Nushell v0.62.0 and above.