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

Translate posix paths to windows paths for cygwin. #1905

Closed
account-login opened this issue Jun 20, 2021 · 3 comments
Closed

Translate posix paths to windows paths for cygwin. #1905

account-login opened this issue Jun 20, 2021 · 3 comments
Labels
wontfix A feature or bug that is unlikely to be implemented or fixed.

Comments

@account-login
Copy link

Hello, as #269 and #275 points out, the experience of using rg on cygwin is not great.

I propose adding the --cygwin-path flag to rg. When enabled, paths in command line will be translated to windows paths using the cygpath command.
For example, rg --cygwin-path xxx /usr /cygdrive/z will be translated to something like rg xxx C:/cygwin/usr Z:/.
Here is a proof of concept implementation: account-login@9686e72

This flag, combined with the --path-separator=/ flag, can improve the usability on cygwin platform.

@BurntSushi
Copy link
Owner

This seems like a duplicate of #269 (which you linked), and in particular, I don't think you've addressed why I marked this as wontfix. See my comments #269 (comment) and #269 (comment).

It sounds like you're asking me reconsider a particular implementation path without actually addressing the concerns I raised.

Maybe I need to change my perspective here and just add this flag that lets folks work around some problems and declare that it might result in other things not behaving as one might expect. But this seems... sloppy to be honest.

@account-login
Copy link
Author

Hi, the flag I proposed just performs a workaround on behave of the user.
To use rg on cygwin, one has to perform path translation anyway, the difference is who is performing the workaround.
So the edge cases you are concerned about (if I understand correctly) are not newly introduced, but existing problems.

Of course, workarounds like this do not fix all the problems, but afaik, there is no way for a non-cygwin app to behave like cygwin app.
So I think it is worthwhile to add some simple workarounds (like the --path-separator before) for common use cases, workarounds like this make problems less, not more.

@BurntSushi
Copy link
Owner

I think this is out of scope for ripgrep.

@BurntSushi BurntSushi closed this as not planned Won't fix, can't repro, duplicate, stale Nov 24, 2023
@BurntSushi BurntSushi added the wontfix A feature or bug that is unlikely to be implemented or fixed. label Nov 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
wontfix A feature or bug that is unlikely to be implemented or fixed.
Projects
None yet
Development

No branches or pull requests

2 participants