I am making a QuickLook plugin that will be included with my application. It will be used to preview a file type that other applications also have QuickLook plugins for. Every time I attempt to test with my plugin (I put it into ~/Library/QuickLook/) it previews with another app's plugin. I am using qlmanage to preview. Is there a way to force it to use mine, at least for testing?
2 Answers
Generators embedded in applications are always preferred to plug-ins in ~/Library/QuickLook (which are preferred to the ones in /Library/QuickLook, which are preferred to the ones in /System/Library/QuickLook).
There is no way to change this priority. Also if 2 generators at the same level claims the same type of file, Quick Look will prefer one over the other, whichever you can't control.
At least for your test, you can force qlmanage to use the plug-in you want by using the -g
option (but you will also have to specify the content-type with -c).
Try qlmanage -h
to get all the options for your tests.

- 3,427
- 20
- 22
While the order of precedence described by @julien is accurate, it is still possible to override a particular application's QL provider. Simply edit the Info.plist
file in the .qlgenerator
of the offending application. For example, I like the way a certain QL provider handles markdown, but one of the text editors I have installed includes (imho) less than stellar markdown support. My preferred bundle loses... until I edit:
/Applications/BadMarkdown.app/Contents/Library/QuickLook/BadMarkdownQL.qlgenerator/Contents/Info.plist
and remove
<string>net.daringfireball.markdown</string>
And in newer versions of OS X, you don't even need to restart the QL daemon. The preferred QL tool just takes over. =D

- 251
- 2
- 2
-
1This is the only working answer. After modifying the `Info.plist` file of the generator you want to override, use `qlmanage -r` to refresh the QuickLook server, then `qlmanage -m plugins | grep zip` (using .zip as an example) to find which plugin has taken over the extension you want to assign to. – Christophe Marois Mar 30 '17 at 03:50