fix(macOS): stop registering Warp as the default handler for Markdown (.md) files#13266
fix(macOS): stop registering Warp as the default handler for Markdown (.md) files#13266AaronReboot wants to merge 1 commit into
Conversation
script/update_plist injects a "Markdown File" CFBundleDocumentTypes entry declaring Warp an Editor for the markdown UTIs. `.md` resolves to the UTI net.daringfireball.markdown, but most editors (e.g. VS Code) register markdown only by file extension, not by that UTI. macOS prefers a UTI-level handler over an extension-only one, so Warp wins the default app resolution for .md even at LSHandlerRank Alternate, and re-wins on every auto-update's re-registration. The result is Warp repeatedly hijacking the user's chosen .md editor (reported in warpdotdev#9076 and warpdotdev#5732); disabling the in-app Markdown viewer does not help, since this is an OS-level Launch Services claim independent of that setting. Remove the "Markdown File" document type so a terminal no longer claims to be a Markdown editor. This also drops the invalid `com.unknown.md` UTI. The Plain Text File and Source Code File types are intentionally left in place.
|
Thank you for your pull request and welcome to our community. We require contributors to sign our Contributor License Agreement, and we don't seem to have the users @AaronReboot on file. In order for us to review and merge your code, each contributor must visit https://cla.warp.dev to read and agree to our CLA. Once you have done so, please comment |
|
Every PR must be linked to a same-repo issue before Oz can review it. Next step: open or find a same-repo issue describing this change, then link it to this PR by adding See the contribution guidelines for the full readiness model. Powered by Oz |
There was a problem hiding this comment.
Every PR must be linked to a same-repo issue before Oz can review it.
Next step: open or find a same-repo issue describing this change, then link it to this PR by adding Closes #123 to the PR description (or using the "Development" sidebar on GitHub). A maintainer will mark the issue ready-to-implement when it is ready. Once it is marked, comment /oz-review to re-trigger review.
See the contribution guidelines for the full readiness model.
Powered by Oz
2372532 to
97c8f62
Compare
|
Thank you for your pull request and welcome to our community. We require contributors to sign our Contributor License Agreement, and we don't seem to have the users @AaronReboot on file. In order for us to review and merge your code, each contributor must visit https://cla.warp.dev to read and agree to our CLA. Once you have done so, please comment |
|
@cla-bot check |
|
The cla-bot has been summoned, and re-checked this pull request! |
Problem
On macOS, Warp registers itself as the default application for Markdown (
.md) files and reclaims that association after updates, overriding the user's chosen editor (e.g. VS Code). Reported in #9076 (see comments — Warp re-registering for.md/.go/.svgafter relaunch; "Even after selecting Always open with VS Code, Warp remains the default") and #5732.Root cause
script/update_plistinjects aMarkdown FileCFBundleDocumentTypesentry declaring Warp an Editor for the markdown UTIs:.mdresolves to the UTInet.daringfireball.markdown. Most editors (e.g. VS Code) register markdown only by file extension, not by this UTI. macOS prefers a UTI-level handler over an extension-only one, so Warp wins the default-app resolution for.mdeven atLSHandlerRank Alternate, and re-wins on every auto-update's re-registration. Because this is an OS-level Launch Services claim, disabling the in-app Markdown viewer (prefer_markdown_viewer = false) does not prevent it. (com.unknown.mdalso appears to be a placeholder/invalid UTI.)Fix
Remove the
Markdown Filedocument type so a terminal no longer registers itself as a Markdown editor — this also drops the invalidcom.unknown.mdUTI. ThePlain Text FileandSource Code Filetypes are intentionally left in place.Closes #13268
Related: #9076, #5732.