Defining rules for ah-tty: Comment lines begin with '#' and are ignored. A rule line is of the form: : Levels are a list of digits (0-7) marking which "help level" this rule will match. The idea behind help levels is that as users gain more experience they will increase their help level and cut down the number of patronizing messages they receive. Currently, the supplied ah-tty.conf only uses levels 0 and 1. Regexp is the extended POSIX regular expression that the command typed by the user must match before the hint is displayed. Any line not of the form of a rule line is taken as the hint text for the preceding rule line. In the case where more than one rule matches the current line, only one hint at a time will be displayed, in the order they appear in the file. Each hint will only be displayed once per prompt, that is, it won't match again until the user hits Return. There are typically 4 types of entries: 1. The command & its options 2. A list of commands that start with that letter 3. A suggestion to use some other command 4. A description on how to use certain patterns (regex) I recommend that you go from the most general to the most specific The start of the regex pattern for a command should be something like: (^|[|\;])[[:space:]]* This makes sure to match the start of the a command line, after a pipe or a start of a new command. It also recognizes spaces that the user may use for readability. But it makes sure that it is a command, not some option or file name used as part of another command. (Yes, that regular expression prefix is hideous, ugly, and generally silly looking.) There are some simple markup rules that are used to provide visual hints to the user. Options (-xx) are made bold. Things in [] are made bold, if the stuff after the [ and before the ] are alphanumeric Things in <> are made bold and green. Again only if the stuff just after the < and before the > are alphanumeric.