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.
Expansions
- [Instructor] When we're working with a shell, we don't always need or want to type things explicitly. And in some cases, it's not even possible to type out information we need to use, like the output of programs or evaluations. Expansions are a whole set of behaviors that use a pattern to stand in or represent something else in a command. This is a list of the order in which various expansions occur and we'll take a look briefly at most of them. Many of the expansions have dozens of options and behaviors that I can't cover in detail here. So if you want to dig into those, take a look at the expansion section of the Z shell man page. You can get to that by typing man zshexpn. History expansion is related to the usage of the command history, as we saw earlier. History expansion comes into play when we use exclamation mark as a shorthand to replace previous commands. We can use exclamation mark and the number to…
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
-
-
-