You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
MattFlower edited this page Jan 15, 2013
·
1 revision
Usage
mcd <some_string>
Searches in the mdfind database for a directory which starts with the string
<some_string>. If there is only a single file found, you will immediately be
switched to that directory. If there are more than one directory found, you
will receive a list of matching directories and you can choose one.
Note that mcd supports the autocompletion functionality in bash. Just use the
tab key to complete a word you are typing.
Limitations
This command only works on machines with an mdfind database -- as far as I know,
this is only OS X boxes which have spotlight on them.
Example
/Users/mflower$ mcd man3
Please choose a directory to change to
--------------------------------------
1. /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator5.0.sdk/usr/share/man/man3
2. /Developer/usr/X11/share/man/man3
3. /Developer/usr/share/man/man3
4. /opt/local/share/man/man3
5. /opt/local/share/man/man3p
6. /opt/subversion/man/man3
7. /opt/subversion_backup.09192012155729/man/man3
8. /usr/X11/share/man/man3
9. /usr/share/man/man3
Your choice: