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.
Command history
- [Instructor] As we're typing and using commands, we often need to run the same command or a slightly modified version of that command more than once over time. In order to help out with this and to prevent us from having to type commands all over again, Z shell offers a useful command history feature. The most basic way of using this is to press the up arrow at the command line. (keyboard typing) Pressing up once recalls the previous command, which we can then edit or press Enter or Return to run. Pressing the up arrow more than once cycles backward through the command history, and pressing down moves back down the list. If you have a multi-line command in your history, like the definition of a function, you can edit as well before running it. If you've configured your shell to use a history file, the history of your commands will be stored there. Usually it's in the Home directory, in a file called .histfile.…
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
-
-
-