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 02:09:13 +03:00 committed by GitHub
parent f84f9a3e1d
commit 1f484a4e34
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 8 additions and 2 deletions

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

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 %}

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 %}