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

Support passing string data and a type to open in the default application. #339

Open
cfjedimaster opened this issue Mar 13, 2024 · 2 comments

Comments

@cfjedimaster
Copy link

The open-cli tool lets you pass an HTML string to open it in the default browser. I'd like to see that in open as well. Use case: I'm hitting an API that returns 4 image URLs. I'd love to build a quick HTML string that shows all 4 options, pass that to open, and it open in my browser.

I could workaround this for now by saving to a temp file and deleting after.

@sindresorhus
Copy link
Owner

We could potentially introduce a new openHtml() import.

@cfjedimaster
Copy link
Author

I was thinking HTML, but it could be useful for other stuff too - like maybe I'm streaming an image from a remote source and want to pass it to open (I'd expect to have to clue it to the file type).

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

2 participants