From the course: Learning Zsh

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Autocompletion

Autocompletion - Unix Tutorial

From the course: Learning Zsh

Start my 1-month free trial

Autocompletion

- [Narrator] In order to save ourselves a lot of repetitive or tedious typing, Z Shell offers auto completion of commands and paths. You can invoke the auto completion after typing a little bit of a command or path and then pressing TAB. Auto completion works by a look at what your trying to do and seeing what commands or reasonable paths can be inferred from the information you've provided. As an example, I'll type P and then I'll press TAB. Just one letter is pretty vague and the Shell can't read my mind. So, Z Shell is asking if I want to see hundreds of recommendations for command names that start with P. I'll say yes but pressing Y. Well that's a lot of things and down here what've I've typed is still at the prompt. So, if I see what I'm looking for I can keep typing and narrow things down. Lets add another letter so, we have PY and I'll press TAB again and now there's fewer matches. I think you can see where…

Contents