Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RFE: bash dirs should support -W like pwd does #4472

Open
1 task done
sam-s opened this issue Mar 28, 2024 · 3 comments
Open
1 task done

RFE: bash dirs should support -W like pwd does #4472

sam-s opened this issue Mar 28, 2024 · 3 comments
Labels

Comments

@sam-s
Copy link

sam-s commented Mar 28, 2024

Description / Steps to reproduce the issue

pwd -W outputs the current directory in windows format that native emacs builds understand.
dirs does not support that option which leads to breakage in emacs.

Expected behavior

dirs -W should print directories in windows format

Actual behavior

dirs does not support -W

Verification

Windows Version

MINGW64_NT-10.0-19045

Are you willing to submit a PR?

no, sorry

@sam-s sam-s added the bug label Mar 28, 2024
@Eli-Zaretskii
Copy link

I support adding this feature, as well as anything else that would allow MSYS Bash to be friendlier to native Windows programs that invoke Bash.

@Biswa96
Copy link
Member

Biswa96 commented Mar 29, 2024

Would it be possible to use cygpath tool like the following example?

$ cygpath -w $(dirs)
C:\MSYS2-packages\bash\bash-5.2
C:\MSYS2-packages\bash\bash-5.2\builtins

The -W option with pwd shell builtin is a customization specific to bash in msys2. In my opinion, such core modification should not exist in downstream packaging.

@stevenclarke9
Copy link

I ran cygpath -w $(dirs) from my home directory and I only got the ~ as a result.
If I replace dirs with pwd I get the following

Steven@StevenLaptopPC MINGW64 ~ 1 $ cygpath -w -l $(pwd)
C:\msys64\home\Steven
Steven@StevenLaptopPC MINGW64 ~ $

This will work for them.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants