Compare commits

..

No commits in common. "main" and "v0.10.0" have entirely different histories.

8 changed files with 14 additions and 24 deletions

View File

@ -1,4 +1,4 @@
name: cd name: Continuous Deployment
on: on:
push: push:
tags: tags:

View File

@ -46,11 +46,11 @@ jobs:
authToken: ${{ env.CACHIX_AUTH_TOKEN }} authToken: ${{ env.CACHIX_AUTH_TOKEN }}
name: zoxide name: zoxide
- name: Setup cache - name: Setup cache
uses: Swatinem/rust-cache@v2.9.2 uses: Swatinem/rust-cache@v2.9.1
with: with:
key: ${{ matrix.os }} key: ${{ matrix.os }}
- name: Install just - name: Install just
uses: taiki-e/install-action@v2.85.10 uses: taiki-e/install-action@v2
with: with:
tool: just tool: just
- name: Run lints + tests - name: Run lints + tests

View File

@ -64,7 +64,7 @@ jobs:
override: true override: true
target: ${{ matrix.target }} target: ${{ matrix.target }}
- name: Setup cache - name: Setup cache
uses: Swatinem/rust-cache@v2.9.2 uses: Swatinem/rust-cache@v2.9.1
with: with:
key: ${{ matrix.target }} key: ${{ matrix.target }}
- name: Install cross - name: Install cross

View File

@ -7,13 +7,6 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## [Unreleased]
### 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 ## [0.10.0] - 2026-07-04
### Added ### Added

View File

@ -16,7 +16,7 @@ function __zoxide_pwd() {
{%- let pwd = "\\builtin pwd -L" -%} {%- let pwd = "\\builtin pwd -L" -%}
{%- endif -%} {%- endif -%}
{%- if cfg!(windows) %} {%- if cfg!(windows) %}
\command cygpath -w "$({{ pwd }})" \command cygpath -w "{{ pwd }}"
{%- else %} {%- else %}
{{ pwd }} {{ pwd }}
{%- endif %} {%- endif %}

View File

@ -101,12 +101,8 @@ function __zoxide_z_complete
# If the last argument is empty, use interactive selection. # If the last argument is empty, use interactive selection.
set -l query $tokens[2..-1] set -l query $tokens[2..-1]
set -l result (command zoxide query --exclude (__zoxide_pwd) --interactive -- $query 2>/dev/null) set -l result (command zoxide query --exclude (__zoxide_pwd) --interactive -- $query 2>/dev/null)
if test $status -eq 0 and builtin commandline --replace -- "{{ cmd.unwrap_or("cd") }} "(string escape -- $result)
builtin commandline --replace -- "{{ cmd.unwrap_or("cd") }} "(string escape -- $result) and builtin commandline --function repaint execute
builtin commandline --function repaint execute
else
builtin commandline --function repaint
end
end end
end end
complete --command __zoxide_z --no-files --arguments '(__zoxide_z_complete)' complete --command __zoxide_z --no-files --arguments '(__zoxide_z_complete)'

View File

@ -57,14 +57,15 @@ export-env {
# Jump to a directory using only keywords. # Jump to a directory using only keywords.
export def --env --wrapped __zoxide_z [...rest: directory] { export def --env --wrapped __zoxide_z [...rest: directory] {
match $rest { let path = match $rest {
[] => { cd ~ }, [] => {'~'},
[ '-' ] => { cd - }, [ '-' ] => {'-'},
[ $arg ] if (try { cd $arg; true } catch { false }) => {}, [ $arg ] if ($arg | path expand | path type) == 'dir' => {$arg}
_ => { _ => {
cd (^zoxide query --exclude $env.PWD -- ...$rest | str trim -r -c "\n") ^zoxide query --exclude $env.PWD -- ...$rest | str trim -r -c "\n"
} }
} }
cd $path
{%- if echo %} {%- if echo %}
echo $env.PWD echo $env.PWD
{%- endif %} {%- endif %}

View File

@ -16,7 +16,7 @@ function __zoxide_pwd() {
{%- let pwd = "\\builtin pwd -L" -%} {%- let pwd = "\\builtin pwd -L" -%}
{%- endif -%} {%- endif -%}
{%- if cfg!(windows) %} {%- if cfg!(windows) %}
\command cygpath -w "$({{ pwd }})" \command cygpath -w "{{ pwd }}"
{%- else %} {%- else %}
{{ pwd }} {{ pwd }}
{%- endif %} {%- endif %}