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
- [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
-
-
-
-
Autocd and cd shorthand4m 15s
-
(Locked)
Directory stack and user dirs4m 17s
-
(Locked)
Finding files and commands3m 59s
-
(Locked)
Autocompletion4m 52s
-
(Locked)
Redirection and multios6m 14s
-
(Locked)
Command history4m 24s
-
(Locked)
History shell variables2m 11s
-
(Locked)
Expansions8m 20s
-
(Locked)
Renaming files with zmv7m 29s
-
(Locked)
Scripting5m 29s
-
-
-