< Back to jwestman.net

Improving Tab Completion in Nautilus
17 February 2021

As a heavy keyboard user, I use the location entry in Nautilus quite often to get around my filesystem: if you press Ctrl+L, ~, or /, you can type a path and go there. There’s also tab complete, to save you some typing, but there was an issue with it. If there’s not exactly one path to complete, the location entry closes and you have to start over.

GIF of a failed tab complete in Nautilus closing the location entry
Both "gnome-contacts" and "gnome-control-center" match "gnome-cont", so when I press Tab too early, it closes the location entry.

This frustrated me, so I fixed it.

Just barely in time for GNOME 40, I finished up a merge request that improves tab completion in a couple ways. First, it no longer closes the location entry if it fails–it just plays an error bell.

Second, there’s now a dropdown showing all the possible completions.

Here’s what it looks like now:

GIF of the new tab complete design in Nautilus's path bar

Taken together, these changes bring tab completion much closer to what you’d get from a terminal shell. It’s not perfect, of course–there’s some things I’d have liked to improve even further, but didn’t have the time this cycle. But overall, I’m pretty happy with how it turned out, and I’m grateful for the opportunity to participate in the development of software I use every day.