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

windows != cmd #14

Closed
Naatan opened this issue Jan 26, 2023 · 6 comments
Closed

windows != cmd #14

Naatan opened this issue Jan 26, 2023 · 6 comments

Comments

@Naatan
Copy link

Naatan commented Jan 26, 2023

This library seems to assume that Windows users by definition only use cmd.exe. It would be nice if one could instrument it in a way that doesn't make this assumption.

Case in point; git for windows ships with a bash for windows, which many developers tend to use.

@MarvinJWendt
Copy link
Member

MarvinJWendt commented Jan 27, 2023

Hi, why do you think that cursor assumes that you're using cmd?

@Naatan
Copy link
Author

Naatan commented Jan 30, 2023

Because cursor.go has //go:build !windows

@MarvinJWendt
Copy link
Member

Yeah, windows handles it a bit different. That's why we have https://github.com/atomicgo/cursor/blob/main/cursor_windows.go
I tested it on several terminal on Windows (including VSC Terminal, Windows Terminal, CMD, PowerShell, etc.), without any bugs.

But I have to admit, I didn't test it with bash for windows. I'll consider upgrading the library, to detect which terminal is being used.

@Naatan
Copy link
Author

Naatan commented Feb 2, 2023

It's not Windows that handles it differently, it's the shell (cmd). In theory your non-windows logic in cursor.go should work perfectly when using bash on windows. Thanks for considering this improvement!

@lammel
Copy link
Collaborator

lammel commented Aug 1, 2023

It's not Windows that handles it differently, it's the shell (cmd). In theory your non-windows logic in cursor.go should work perfectly when using bash on windows. Thanks for considering this improvement!

Quite a few issues were addressed with v0.2.0. I just testen on bash for windows (git bash) without any issue. Could you verify this works for you too @Naatan ?

@MarvinJWendt
Copy link
Member

Closing this as stale.

@MarvinJWendt MarvinJWendt closed this as not planned Won't fix, can't repro, duplicate, stale Aug 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants