mirror of
https://github.com/ajeetdsouza/zoxide.git
synced 2026-07-17 00:37:24 +02:00
Nushell: handle symlinked directories
ci / ubuntu-latest (push) Has been cancelled
release / aarch64-apple-darwin (push) Has been cancelled
release / x86_64-apple-darwin (push) Has been cancelled
release / aarch64-unknown-linux-musl (push) Has been cancelled
release / armv7-unknown-linux-musleabihf (push) Has been cancelled
release / i686-unknown-linux-musl (push) Has been cancelled
release / riscv64gc-unknown-linux-musl (push) Has been cancelled
release / x86_64-unknown-linux-musl (push) Has been cancelled
release / aarch64-linux-android (push) Has been cancelled
release / arm-unknown-linux-musleabihf (push) Has been cancelled
release / armv7-linux-androideabi (push) Has been cancelled
release / aarch64-pc-windows-msvc (push) Has been cancelled
release / x86_64-pc-windows-msvc (push) Has been cancelled
ci / ubuntu-latest (push) Has been cancelled
release / aarch64-apple-darwin (push) Has been cancelled
release / x86_64-apple-darwin (push) Has been cancelled
release / aarch64-unknown-linux-musl (push) Has been cancelled
release / armv7-unknown-linux-musleabihf (push) Has been cancelled
release / i686-unknown-linux-musl (push) Has been cancelled
release / riscv64gc-unknown-linux-musl (push) Has been cancelled
release / x86_64-unknown-linux-musl (push) Has been cancelled
release / aarch64-linux-android (push) Has been cancelled
release / arm-unknown-linux-musleabihf (push) Has been cancelled
release / armv7-linux-androideabi (push) Has been cancelled
release / aarch64-pc-windows-msvc (push) Has been cancelled
release / x86_64-pc-windows-msvc (push) Has been cancelled
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
name: Continuous Deployment
|
||||
name: cd
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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 %}
|
||||
|
||||
Reference in New Issue
Block a user