-
-
Notifications
You must be signed in to change notification settings - Fork 572
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
Support "Copy Path" operation in WSL #2413
Support "Copy Path" operation in WSL #2413
Conversation
@cruessler could you test that on windows? |
I only have Linux and Mac machines available, unfortunately. |
I can test it tonight if you want @extrawurst |
@Concelare that would be awesome |
@extrawurst Sorry! Meant to mention that I was going to test it when I got back into work today and had access to my WSL instance. Looks like everything is working as expected! :) |
I tested this and it worked as expected,I didn't have the most time this evening to test it in every way but I had no issues using it as intended. 👍 Tested on Windows 10 WSL 2 Ubuntu 24.04, Used it on few different git repos of different size with no issues |
Thank you, @Concelare! |
@johnDeSilencio thank you for the contribution! |
This PR adds support for the "Copy Path" operation in the "Files" tab when running in WSL.
For those like myself who are accessing WSL from a terminal, there is no X server, so
xclip
won't work. However, my Ubuntu WSL image at work still hasxclip
installed, whichgitui
detects and uses, causinggitui
to freeze. I have to killgitui
at that point.This PR checks if we are running in WSL by examining the description of the kernel in the OS release file,
/proc/sys/kernel/osrelease
. Ifgitui
is running in WSL, we copy the path to the Windows clipboard using theclip.exe
utility.I followed the checklist:
clipboard.rs
, so I didn't try to add any here)make check
without errors (proof: output.txt)Added
subsection underUnreleased
)