diff --git a/.github/workflows/cd.yml b/.github/workflows/cd.yml index 9e3ff41..d56205b 100644 --- a/.github/workflows/cd.yml +++ b/.github/workflows/cd.yml @@ -1,4 +1,4 @@ -name: Continuous Deployment +name: cd on: push: tags: diff --git a/CHANGELOG.md b/CHANGELOG.md index d57588e..a952e0b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Fixed - Bash/Zsh: fix `z` failing on Cygwin/MSYS2 due to `cygpath` being passed a bad string. +- Nushell: `z` now handles relative paths through symlinked directories. ## [0.10.0] - 2026-07-04 diff --git a/templates/nushell.txt b/templates/nushell.txt index 2cf358a..e2aa661 100644 --- a/templates/nushell.txt +++ b/templates/nushell.txt @@ -57,15 +57,14 @@ export-env { # Jump to a directory using only keywords. export def --env --wrapped __zoxide_z [...rest: directory] { - let path = match $rest { - [] => {'~'}, - [ '-' ] => {'-'}, - [ $arg ] if ($arg | path expand | path type) == 'dir' => {$arg} + match $rest { + [] => { cd ~ }, + [ '-' ] => { cd - }, + [ $arg ] if (try { cd $arg; true } catch { false }) => {}, _ => { - ^zoxide query --exclude $env.PWD -- ...$rest | str trim -r -c "\n" + cd (^zoxide query --exclude $env.PWD -- ...$rest | str trim -r -c "\n") } } - cd $path {%- if echo %} echo $env.PWD {%- endif %}