diff --git a/CHANGELOG.md b/CHANGELOG.md index 8c803fd..d57588e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,12 @@ 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/), 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. + ## [0.10.0] - 2026-07-04 ### Added diff --git a/templates/bash.txt b/templates/bash.txt index e5df5c7..d3be26c 100644 --- a/templates/bash.txt +++ b/templates/bash.txt @@ -16,7 +16,7 @@ function __zoxide_pwd() { {%- let pwd = "\\builtin pwd -L" -%} {%- endif -%} {%- if cfg!(windows) %} - \command cygpath -w "{{ pwd }}" + \command cygpath -w "$({{ pwd }})" {%- else %} {{ pwd }} {%- endif %} diff --git a/templates/zsh.txt b/templates/zsh.txt index c72178f..fe67c1f 100644 --- a/templates/zsh.txt +++ b/templates/zsh.txt @@ -16,7 +16,7 @@ function __zoxide_pwd() { {%- let pwd = "\\builtin pwd -L" -%} {%- endif -%} {%- if cfg!(windows) %} - \command cygpath -w "{{ pwd }}" + \command cygpath -w "$({{ pwd }})" {%- else %} {{ pwd }} {%- endif %}