January 2014
Beginner
132 pages
2h 45m
English
Finally, we will turn our attention to compsys, zsh's completion system. This is one of the most complex parts of the shell for users and developers alike. Before we dive into compsys, however, we need to make a quick stop and meet an actual function in the wild.
As usual, you can learn more about compsys via the manpages. Of particular interest are man zshcompsys and man zshcompwid.
Here's what one of these looks like:
hi() {
print 'Hello, world'
}Here, we have defined the hi function, which is how we'll call it again later when we need it. This will, in turn, print Hello, world every time we use it. So let's get to it, shall we?
Open your terminal emulator of choice, and type the following (one line at a time):
% hi() {Read now
Unlock full access