user2258552
user2258552

Reputation: 822

bash cd autocompletion without alias?

How do I use cd such that when I type 'cd wo' and there is only one directory starting with 'wo' (say, 'work'), that cd cd's into work? I think I remember doing this and I did not make a custom alias.

Upvotes: 0

Views: 157

Answers (2)

mgarciaisaia
mgarciaisaia

Reputation: 15550

You're probably looking for bash-completion.

Upvotes: 0

Jeff Sisson
Jeff Sisson

Reputation: 1636

In Bash, pressing the "tab" key will autocomplete paths and directories.

So cd wo[tab] becomes cd work.

More on other forms of Bash autocompletion here.

Upvotes: 1

Related Questions