-
-
Notifications
You must be signed in to change notification settings - Fork 593
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 MR contains the following updates: | Package | Update | Change | |---|---|---| | [extrawurst/gitui](https://github.com/extrawurst/gitui) | minor | `v0.26.3` -> `v0.27.0` | MR created with the help of [el-capitano/tools/renovate-bot](https://gitlab.com/el-capitano/tools/renovate-bot). **Proposed changes to behavior should be submitted there as MRs.** --- ### Release Notes <details> <summary>extrawurst/gitui (extrawurst/gitui)</summary> ### [`v0.27.0`](https://github.com/extrawurst/gitui/releases/tag/v0.27.0) [Compare Source](gitui-org/gitui@v0.26.3...v0.27.0) **new: manage remotes**  ##### Breaking Changes - use default shell instead of bash on Unix-like OS \[[@​yerke](https://github.com/yerke)] ([#​2343](gitui-org/gitui#2343)) ##### Added - add popups for viewing, adding, updating and removing remotes \[[@​robin-thoene](https://github.com/robin-thoene)] ([#​2172](gitui-org/gitui#2172)) - support for `Copy Path` action in WSL \[[@​johnDeSilencio](https://github.com/johnDeSilencio)] ([#​2413](gitui-org/gitui#2413)) - help popup scrollbar \[[@​wugeer](https://github.com/wugeer)] ([#​2388](gitui-org/gitui#2388)) ##### Fixes - respect env vars like `GIT_CONFIG_GLOBAL` ([#​2298](gitui-org/gitui#2298)) - Set `CREATE_NO_WINDOW` flag when executing Git hooks on Windows ([#​2371](gitui-org/gitui#2371)) </details> --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever MR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this MR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this MR, check this box --- This MR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzOS4xMzcuMSIsInVwZGF0ZWRJblZlciI6IjM5LjEzNy4xIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJSZW5vdmF0ZSBCb3QiXX0=-->
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
)