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

macOS: Use system API to open links #5256

Open
mitchellh opened this issue Jan 20, 2025 · 0 comments
Open

macOS: Use system API to open links #5256

mitchellh opened this issue Jan 20, 2025 · 0 comments
Labels

Comments

@mitchellh
Copy link
Contributor

Discussed in #5200

Originally posted by sindresorhus January 18, 2025
Currently, it uses the open command. The problem with using that is that it makes it impossible for browser pickers apps to detect that the link is opened from Ghostty, because by the time the app checks for the source app, the open command has exited. It should also be slightly faster to use the system API: https://developer.apple.com/documentation/appkit/nsworkspace/open(_:)?language=objc

I'm referring to: https://github.com/ghostty-org/ghostty/blob/72d085525b22d66468c5969a4d507a0fa68d4a04/src/os/open.zig#L32C9-L41C11


Specifically, Velja uses the source app to let users create advanced rules for which browser to use depending on the source app.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant