Skip to content

fix: use PowerShell instead of wslview on WSL#123

Merged
Byron merged 1 commit into
mainfrom
avoid-wslview
Jun 29, 2026
Merged

fix: use PowerShell instead of wslview on WSL#123
Byron merged 1 commit into
mainfrom
avoid-wslview

Conversation

@Byron

@Byron Byron commented Jun 29, 2026

Copy link
Copy Markdown
Owner

Tasks

This section is for Byron only. Models continuing this PR must not add, remove, check, uncheck, rename, or reorder checkboxes here.

  • refackiew

Everything below this line was generated by Codex GPT-5.

Created by Codex on behalf of Byron. Byron will review before this is ready to merge.

Summary

  • Replace the WSL-specific wslview opener with a PowerShell Start-Process -FilePath command invocation.
  • Quote the target as PowerShell data, and convert WSL paths before invoking PowerShell: /mnt/<drive>/... becomes a Windows drive path, while other absolute WSL paths become UNC paths under \\wsl$\<distro>.
  • Preserve the existing Unix fallbacks after the WSL opener, update README/API docs, and remove the now-unused pathdiff dependency.

Issue

Fixes #122.

Reference: #122 (comment)

Validation

  • cargo test
  • cargo check --target aarch64-unknown-linux-gnu --tests
  • cargo clippy --workspace --all-targets -- -D warnings
  • cargo +1.82.0 check --tests
  • cargo +1.62.0 check --tests was attempted, but dependency resolution selected libc v0.2.186, which requires rustc 1.65 before this crate is checked.
  • codex review --commit 827c0e069d6033aa7c265d41b42a968d835ab45d returned no actionable findings after the review follow-ups.

@Byron Byron marked this pull request as ready for review June 29, 2026 08:19
WSL users reported that wslu's wslview is discontinued and unavailable in
some package managers. The regression tests cover the WSL command builder and
initially failed because the first generated command was still `wslview`.

Build the WSL opener as a PowerShell `Start-Process -FilePath` script argument
with the target quoted as data, then retain the xdg-open, gio, gnome-open, and
kde-open fallbacks. Update the user-facing docs and keep the WSL command builder
testable from host builds without adding dev-dependencies.

Co-authored-by: Sebastian Thiel <sebastian.thiel@icloud.com>

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 60eba78db3

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/unix.rs
@Byron

Byron commented Jun 29, 2026

Copy link
Copy Markdown
Owner Author

Needs an actual WSL test, which I can't currently perform.

@gabevenberg

Copy link
Copy Markdown

Needs an actual WSL test, which I can't currently perform.

Did a very unscientific test of using cargo run to open a pdf file and a URL, it opened both in their proper programs. Cant take a video, only windows device I have access to is a work device.

@Byron

Byron commented Jun 29, 2026

Copy link
Copy Markdown
Owner Author

Alright then, let's do it!

@Byron Byron merged commit 41c4cf0 into main Jun 29, 2026
7 checks passed
@Byron

Byron commented Jun 29, 2026

Copy link
Copy Markdown
Owner Author

And here is the new release: https://github.com/Byron/open-rs/releases/tag/v5.3.6

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.

WSL: wslu/wslview no longer maintained.

3 participants