Skip to Content
Navigation:

A stick figure smiling

This is a page from an upcoming zine called "The Secret Rules of the Terminal".

To get an email when the zine comes out, sign up for the zine announcements list!

Image of a comic. To read the full HTML alt text, click "read the transcript". browse more comics! get the zine!
read the transcript!

your shell can help you type weird filenames

person: “ugh how do I escape that filename again?” shell: “I can handle it! Just use Tab!”

cycle through matching filenames

rm f<Tab><Tab><Tab><Tab>

(doesn’t work in bash unless you configure it)

configure bash to cycle through matching filenames

Add this to your ~/.inputrc:

set show-all-if-ambiguous on
set menu-complete-display-prefix on
TAB: menu-complete

tab complete from the middle of a filename

ls *thing*<Tab>

(or in fish just ls thing<Tab>)

tab completion can go wrong

programs can change how tab completion works with plugins called “completions”

this is usually GREAT (git add <Tab> only completes modified files!) but sometimes it’s buggy

quote filenames with spaces

cat "Julia Evans.txt"

(if you don’t do this you get weird “file not found” errors for Julia and Evans.txt)

tab completion works inside quoted strings

cat "File N<Tab

Saturday Morning Comics!

Want another comic like this in your email every Saturday? Sign up here!

I'll send you one of my favourite comics from my archives every Saturday.
© Julia Evans 2024 | All rights reserved (see the FAQ for notes about licensing)