cursor icon indicating copy to clipboard operation
cursor copied to clipboard

windows != cmd

Open Naatan opened this issue 2 years ago • 5 comments

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.

Naatan avatar Jan 26 '23 22:01 Naatan

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

MarvinJWendt avatar Jan 27 '23 07:01 MarvinJWendt

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

Naatan avatar Jan 30 '23 20:01 Naatan

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.

MarvinJWendt avatar Feb 01 '23 22:02 MarvinJWendt

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!

Naatan avatar Feb 02 '23 17:02 Naatan

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 ?

lammel avatar Aug 01 '23 18:08 lammel

Closing this as stale.

MarvinJWendt avatar Aug 09 '24 12:08 MarvinJWendt