Skip to Content
Mac OS X Power Hound, Second Edition
book

Mac OS X Power Hound, Second Edition

by Rob Griffiths
September 2004
Intermediate to advanced
576 pages
16h 1m
English
O'Reilly Media, Inc.
Content preview from Mac OS X Power Hound, Second Edition

Shell Hints

Since the shell is where you spend much of your Terminal time, it’s just good horse sense to have a shell that works efficiently. The following hints are all tips for maximizing bash.

Nixing Case-Sensitivity in Autocompletion

To amp up your efficiency in Terminal, use the autocomplete feature described in Section 15.2.5. Instead of typing cd /Library/WebServer/Documents, you only have to type cd /L W D. Ha...mere kid’s play! (Just remember to press Tab after each letter to make Terminal complete the missing portions for you.)

While this feature is quite convenient, the shell is picky about what it autocompletes. For instance, if you improperly capitalize any portion of what you type, you’ll get a beep instead of a completed path. Hey, what can you do? The shell is case-sensitive.

To fix this, simply add the following line to the .inputrc file in your Home folder:

set completion-ignore-case On

Note

You need to set this variable in the .inputrc file, rather than, say, your .bash_profile file, since the autocomplete feature is part of the readline library, not the shell itself.

To return to case-sensitive behavior (for whatever reason), simply delete that line in your .inputrc file and launch a new session with bash.

Finding Files in the Current Directory

While locate is a super tool for searching your entire hard drive (hint Section 15.6.5), it can be cumbersome for more focused searches. To restrict locate to a certain directory, you must include the full path as part of the ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.

Read now

Unlock full access

More than 5,000 organizations count on O’Reilly

AirBnbBlueOriginElectronic ArtsHomeDepotNasdaqRakutenTata Consultancy Services

QuotationMarkO’Reilly covers everything we've got, with content to help us build a world-class technology community, upgrade the capabilities and competencies of our teams, and improve overall team performance as well as their engagement.
Julian F.
Head of Cybersecurity
QuotationMarkI wanted to learn C and C++, but it didn't click for me until I picked up an O'Reilly book. When I went on the O’Reilly platform, I was astonished to find all the books there, plus live events and sandboxes so you could play around with the technology.
Addison B.
Field Engineer
QuotationMarkI’ve been on the O’Reilly platform for more than eight years. I use a couple of learning platforms, but I'm on O'Reilly more than anybody else. When you're there, you start learning. I'm never disappointed.
Amir M.
Data Platform Tech Lead
QuotationMarkI'm always learning. So when I got on to O'Reilly, I was like a kid in a candy store. There are playlists. There are answers. There's on-demand training. It's worth its weight in gold, in terms of what it allows me to do.
Mark W.
Embedded Software Engineer

You might also like

Mac OS X Tiger in a Nutshell

Mac OS X Tiger in a Nutshell

Andy Lester, Chris Stone, Chuck Toporek, Jason McIntosh
Running Mac OS X Tiger

Running Mac OS X Tiger

Jason Deraleau, James Duncan Davidson
Mac OS X Hacks

Mac OS X Hacks

Kevin Hemenway, Rael Dornfest
FreeBSD6 Unleashed

FreeBSD6 Unleashed

Brian Tiemann

Publisher Resources

ISBN: 059600818XCatalog PageErrata