All posts tagged Finder

Enable Finder to QuickLook all unknown files

Ever wanted to be able to QuickLook into README files that have no file extension or other text files that Finder normally doesn’t know how to handle – like .nfo, .log, etc?
Here is one trick to rule them all:

Download and installĀ qlcolorcode, normally this is just a QuickLook source code highlighting plugin. But very useful by itself already.
Change Info.plist inside the QLColorCode.qlgenerator bundle you downloaded by adding the content type:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "">
<plist version="1.0">

Every file OS X does not know how to handle should have theĀ content type, so we just ruled them all.
To apply your changes, you have make OS X rescan it by moving the Plugin out of /Library/QuickLook and putting it back in.

Now take a file that should be QuickLookable now and execute:

qlmanage -d 1 -p file.ext

The last two lines of the answer should read something like this:

[DEBUG] Loading <QLGenerator /Library/QuickLook/QLColorCode.qlgenerator>
[DEBUG] Previewing /Path/to/your/file.ext finished

Also useful, to find out about the content type of a given file:

mdls yourfile.ext