Skip to Content
Small, Sharp Software Tools
book

Small, Sharp Software Tools

by Brian P. Hogan
June 2019
Intermediate to advanced
328 pages
7h 27m
English
Pragmatic Bookshelf
Content preview from Small, Sharp Software Tools

Using Autocompletion

If you need to reference a filename or directory in a command, you can type part of the name, followed by the Tab key, and the CLI will attempt to autocomplete the word for you. Try this out. Switch to the Documents directory in your home directory like this:

 $ ​​cd​​ ​​~/Doc<Tab>

As soon as you press Tab, the word Documents will expand. This technique serves two purposes. First, it saves you from typing the whole name, which means you’ll make less typos. But second, the CLI only completes filenames and directory names it can find. If it can’t complete it, there’s a good chance it doesn’t have enough information, or the file doesn’t actually exist. Try this out. Navigate to your home directory:

 $ ​​cd

Then type:

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.
Start your free trial

You might also like

The VimL Primer

The VimL Primer

Benjamin Klein
What Employees Want Most in Uncertain Times

What Employees Want Most in Uncertain Times

Kristine W. Powers, Jessica B.B. Diaz

Publisher Resources

ISBN: 9781680507003Errata Page