Google Apps, hosted software. Learn More.

Recent Articles

41 Bugs Attended To In Latest Round Of Leopard...
David Utter has posted a story at SecurityProNews regarding the ever-important topic of security fixes for Mac OS X Leopard and the Safari web browser. I can't...

On Leopard Compatibility
I know a lot of people rushed to installed Leopard (Mac OS X 10.5) last night and my friends found it very odd that I was not one of those early adopters.

Can Macs Log Out Automatically After Inactivity?
Hi Dave. I run a network of Mac computers at a high school in Oregon and find that the kids often leave their computers running after class. This means the next...

The K.I.S.S. Approach To RSS / Atom Feed Reading...
One of the things that I have been very conscious about this time around over the last few weeks, while I am putting things together to make my MacBook Pro...


Sign Up For adCenter - Get $50 In Free* Clicks.
12.12.07


Improve QuickLook In Leopard

By A.P. Lawrence

Leopard's new "Quicklook" is a nice tool, but for stubborn old command line types like me, it has some limitations: it won't show me plain text files unless they have the extension ".txt".

It's possible that somewhere there's a preference you could add to Quicklook, but I haven't heard of it yet.

There is another way to make Quicklook show "unknown" files: you can mess with the files Info.plist as explained at this MacOSXhints.com 10.5: Add Quick Look support for certain file formats post. But that's really only useful once you realize you WANT to look at the file; I wanted something more automatic.

A simple command line script does the job for me. I call it "looky":



(I modified that from a MacOSXhints.com post.)

Not much to it, is there? All it does is force Quicklook to interpret the file as plain text. We could make it fancier if we wanted by checking to see if we need to add the "-c public.plain-text", but for my command line use, this is fine - I don't need anything smarter.

Google Apps, hosted software. Learn More.

But perhaps you do, so here's the "smart" version:



That let's us add a "-f" if we absolutely want to force the issue. but otherwise uses "ordinary" Quicklook for files with extensions, and forces them to be interpreted as text if there is no extension.

Put this in ~/bin, chmod 755 it, and at a Terminal prompt, use "looky filenames or wildcards" to see it in action.

By the way, on my own system I would not have bothered with all the extraneous quotes around "$file" - the only reason those are there is because of files with spaces in their names, and I would create such a thing on my machine.

Comments

*Originally published at APLawrence.com


About the Author:
A.P. Lawrence provides SCO Unix and Linux consulting services http://www.pcunix.com

About MacProNews
MacProNews editors, reporters and contributors deliver Mac users the news they need to stay informed about the Mac and Apple. The MacProNews newsletter is Mac News and More.

MacProNews is brought to you by:

WebProNews.com Jayde.com
MarketingNewz.com SalesNewz.com
CareerNewz.com InvestNewz.com
eCommNewz.com WebsiteNotes.com
AdvertisingDay.com ManagerNewz.com
SearchNewz.com CRMNewz.com


-- MacProNews is an iEntry, Inc. publication --
iEntry, Inc. 2549 Richmond Rd. Lexington KY, 40509
2007 iEntry, Inc.  All Rights Reserved  Privacy Policy  Legal

archives | advertising info | news headlines | free newsletters | comments/feedback | submit article


MacProNews Home Page About Article Archive News Downloads WebProWorld Forums iEntry Advertise Contact Jayde MacProNews News Archives About 

Us Feedback MacProNews - Mac News and More WebProWorld Forum