Fix MSYS2 cygpath pwd substitution (#1260)

---------

Co-authored-by: cyphercodes <cyphercodes@users.noreply.github.com>
Co-authored-by: Ajeet D'Souza <98ajeet@gmail.com>
This commit is contained in:
Rayan Salhab
2026-07-07 04:39:13 +05:30
committed by GitHub
co-authored by cyphercodes Ajeet D'Souza
parent f84f9a3e1d
commit 1f484a4e34
3 changed files with 8 additions and 2 deletions
+6
View File
@@ -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
+1 -1
View File
@@ -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 %}
+1 -1
View File
@@ -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 %}