First, we look at what an event is, and examples of event entries. Then, we learn how to feed those events to zsh, and how to get useful reports from zsh. On the next page, we learn how to customize the appearance of these reports.
An event consists of the following:
To look for events associated with a particular user,
simply use their username in the event specification.
To look for events from a specific host, use '@' followed immediately by the remote hostname.
To look for events on a specific line, use '%' followed immediately by the line name. (IE, pts/186)
Any or all of these components can be present when specifying events. Zsh then reports any event that matches ALL components of the entry.
An entry that matches all events associated with user
An entry that matches all events from hostname
and on line
An entry that matches all events of user
You need to put the list of events that zsh should watch for in the
WATCH shell variable. This can be
from the command line, but you'll probably want to
setting one changes the other. If the shell is
invoked in sh or ksh emulation mode, however, you'll
have to use the (uppercase)
Normally, you'll assign an array value to the
parameter. There are, however, two special cases which we discuss
1. To monitor every event on the system, you can
assign the single value of
all to the
2. To monitor all events except your own (tied to
$USERNAME), assign the single value
Otherwise, you'll need to assign a list of events:
watch=(event1 event2 ... eventN)
Zsh then reports all events that fully match any of the entries
you placed in the
(See the top of this page for info on specifying event entries)
LOGCHECKto some interger n will cause zsh to report monitored events every n seconds. (60 seconds is the default.) You can have zsh report all users currently logged in who are affected by the
watchparameter by running the
logcommand at any time.
The next page contains detailed information on configuring how the reports look.