You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
this would be nice to have. @Ch1pzZz suggested to do this by locating the browser exe, but I don't think that scales (will be different on every OS and computer).
It might be worthwhile to figure out whether there is a system utility to open the system default browser to a certain URL from the shell.
If there is no such system utility, it might be worthwhile installing one.
Or maybe some browsers have a CLI interface that we could call, and we could just use that if the browser is installed.
But overall, this isn't super important.
We can also just point users to open a url in the browser.
The text was updated successfully, but these errors were encountered:
found this. Think this should open the brower and the URL could be entered in the script too. If it works the way I think it does that should also make #11 obsolete as we could use the line in the scrip and people wouldnt even have to copy the URL?
I think it should be possible to hack together a little wrapper using the commands in this so-answer.
You'd basically be checking in some order whether some tool is available, and if not, test the next one until the script can successfully open the browser, or exit with a warning message or something.
It's not super critical to open the browser, so it need not be an error if it's not possible.
I guess on macos you'd have to use the call in one of the other answers open....
So as not to paste macOS commands into Linux and vice-versa, it might be a good idea to test whether the current OS is Linux or macOS, independently of which tools are available. open ... AFAIK, doesn't exist/work on Linux, so it'd be weird to even test it there.
But those are just details, I think this answer has all of whats needed.
Basically a lot of bash control flow (if clauses :).
this would be nice to have.
@Ch1pzZz suggested to do this by locating the browser exe, but I don't think that scales (will be different on every OS and computer).
It might be worthwhile to figure out whether there is a system utility to open the system default browser to a certain URL from the shell.
If there is no such system utility, it might be worthwhile installing one.
Or maybe some browsers have a CLI interface that we could call, and we could just use that if the browser is installed.
But overall, this isn't super important.
We can also just point users to open a url in the browser.
The text was updated successfully, but these errors were encountered: