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

Unnecessary condition #21

Open
datcit241 opened this issue Aug 24, 2024 · 0 comments
Open

Unnecessary condition #21

datcit241 opened this issue Aug 24, 2024 · 0 comments

Comments

@datcit241
Copy link

datcit241 commented Aug 24, 2024

First of all, thank you for your great contribution.

Can you please remove this condition, as I don't think it's quite needed because if the command is not executable then there will be an error when trying to open the URL anyway. Additionally, I have one use case that cannot be fulfilled with this condition checking as follows: I am using WSL, and I need to open the URL by a Windows command so that it will be opened in a Windows browser not the other way around. And, the way to do this is by having this command: cmd.exe /C start $url yet it fails the executable condition as it is not an application but a whole command.

So, please consider removing this. Thank you.

Edit1: ủa Vietnamese huh? Xin chào đồng chí =)))
Edit2: we can also modify the "default" app behavior when using WSL to open by a Windows browser as well, as while opening the URL in a WSL browser is possible, the experience is still very sluggish. This is how you can detect WSL: uname.release:lower():find("microsoft") and true or false. Also, if you are okay with it, I can make a pull request for this.

if fn.executable(app) == 1 then

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

No branches or pull requests

1 participant