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

feat(actions): Add wslview compatible feature #135

Merged
merged 1 commit into from
Nov 18, 2023
Merged

feat(actions): Add wslview compatible feature #135

merged 1 commit into from
Nov 18, 2023

Conversation

mtwtkman
Copy link
Contributor

@mtwtkman mtwtkman commented Nov 17, 2023

I added an option for using wslview command to open url, because wsl does not work with xdg-open without custom setting.

Regression Test

This changed file has not been auto-tested, so I tested manually only for system function on may local wsl environment.
Detail:

  1. Copy system function definition to clipboard.
  2. Open neovim.
  3. Paste my neovim command mode like :lua <copied function body>.
  4. Call function like :lua system("https://github.com").
  5. I ensured opening the target page on Windows side browser.

And I did unittests via vusted and all green.

Platforms

  • windows
  • macOS
  • linux (using wsl)

Tasks

If I was needed below them, I will do.

  • Use GitLink to copy git link.
  • Use GitLink! to open git link in browser.
  • Use GitLink blame to copy the /blame git link.
  • Use GitLink! blame to open the /blame git link in browser.
  • Copy git link in a symlink directory of git repo.
  • Copy git link in an un-pushed git branch, and receive an expected error.
  • Copy git link in a pushed git branch but edited file, and receive a warning says the git link could be wrong.

Copy link

codecov bot commented Nov 17, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (cafacd0) 75.78% compared to head (bb1eefd) 76.94%.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #135      +/-   ##
==========================================
+ Coverage   75.78%   76.94%   +1.16%     
==========================================
  Files          11       11              
  Lines         921      911      -10     
==========================================
+ Hits          698      701       +3     
+ Misses        223      210      -13     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@linrongbin16
Copy link
Owner

linrongbin16 commented Nov 17, 2023

hi @mtwtkman, the wsl here is the linux subsystem in Windows? and even neovim detect the system as a linux, it still has the wslview command, which should only exists in wsl system (not exist on real linux), correct?

----—--------------

I found this: https://github.com/wslutilities/wslu. and looks like I am correct.

so real linux won't have this wslview command. then it should be fine, won't break linux users behavior.

hi @mtwtkman, I will help do some testing on my ubuntu vm and after confirmed nothing breaks, will merge your PR.

thanks for contribute!

@linrongbin16 linrongbin16 changed the title Add wslview compatible feature feat(actions): Add wslview compatible feature Nov 17, 2023
@mtwtkman
Copy link
Contributor Author

@linrongbin16
Thanks for your reviewing. And I apologize for my ambiguity of terms wsl and wslview.

the wsl here is the linux subsystem in Windows?

Yes you are correct about both of wsl and wslview in this PR, perfect.

Your testing is so many help for me because I have no real linux environment (so sorry). Thanks a lot.
Regard.

@linrongbin16
Copy link
Owner

Your testing is so many help for me because I have no real linux environment (so sorry). Thanks a lot. Regard.

;)

@linrongbin16 linrongbin16 merged commit ebb7a73 into linrongbin16:master Nov 18, 2023
7 of 8 checks passed
@linrongbin16
Copy link
Owner

hi @mtwtkman , merged into master branch.

@mtwtkman mtwtkman deleted the use-wslview branch November 19, 2023 01:13
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

Successfully merging this pull request may close these issues.

None yet

2 participants