-
Notifications
You must be signed in to change notification settings - Fork 50
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
Several Improvements (well... see description) #25
Comments
question: isn't xdg-open always available? |
You... are probably right. But by that logic, why are we checking for alternatives at all? Do u want me to special case EDIT: On my wsl ubuntu install, |
Will have a closer look later. In the meantime: Maybe also consult the ‘opener’ crate for reference. |
Would you be OK to send a draft PR so I can have a look and potentially leave some comments? |
Yes I'll do that. At time of writing i still haven't finished the last point I mentioned |
Use std `Command` instead of `ShellExecuteW` from windows sys crate. This change was already attempted in: Byron#25 and later reverted in: Byron#27 and it it seems that it didn't work due to incorrect usage of `explorer` instead of `cmd /c start`. (see helix-editor/helix#5820 (comment) for detailed explanation). Related: helix-editor/helix#5820
I forked your project and made a bunch of changes. So far I've
cfg(target_os)
was being usedwhich
to check for the different open handlers.I also plan to change the windows variant to call to
explorer.exe
usingCommand
instead ofwinapi::um::shellapi::ShellExecuteW
. This removes unsafe fromwindows::that
and drastically simplifies the method.I would like your feedback on my changes.
Whether you accept them or not, I love
open
! Previously I was using a shell function, which was very hacky not always portable.The text was updated successfully, but these errors were encountered: