Two basic query commands are available: SS and FILES. The SS command shows the sets generated by a query, but does not display the actual file names that satisfy the query. The FILES command only displays the list of files, it does not show any of the sets created during the query.
Queries consist of keywords and identifier strings. The keywords are: and or not lid aid match and s<number> where s<number> is a set number consisting of the letter s followed (with no space) by a decimal set number. A clause of the form lid <identifier list> invokes lid with the <identifier list> as arguments and produces a set of files as a result. Substituting aid for lid runs the aid program to generate the list of files. As a shorthand notation for lid <identifier> you may simply use <identifier>. The match operator runs the standard system ls utility to produce a set of files. This allows sets to be constructed based on the names of files (using wild cards) rather than contents. The and or and not operators can be used to combine sets in the obvious fashion. If you need to pass any of the keywords as actual arguments to programs, or if the search strings contain any shell escape characters place the argument in quotes.
The NOT operator has highest precedence, followed by AND and OR in that order. Parenthesis may be used for grouping.
The remaining commands are:
BEGIN <directory> accepts a directory name and switches to that directory. By changing directories you control which ID database is searched. Changing directories automatically deletes all the sets constructed so far. The BEGIN command may be abbreviated as B.
SETS shows the description of all the sets created so far. Each set description has the set number, the number of files in the set, and a symbolic description of the query that created the set.
SHOW <set number> runs a pager program, passing as arguments all the files in the specified set. The pager program comes from the $PAGER environment variable. This command may be abbreviated P.
HELP runs the pager on the help file. The commands H and ? also act as help commands.
OFF exits the program. Q is short for OFF.
All commands and keywords are case insensitive, so that SHOW ShOW and show all work equally well.
If the command starts with a !, iid strips off the leading ! and simply runs the command. Any output goes to stdout and is not recorded as a set.
In both types of shell commands, any set numbers specified as arguments are expanded into a list of file names before running the command.
===> iid iid> ss lid "^get" or lid "Arg$" S0 14 lid -kmn "^get" S1 3 lid -kmn "Arg$" S2 15 (lid -kmn "^get") OR (lid -kmn "Arg$") iid> f s1 lid.c paths.c init.c iid> off
In this example the ss command displays the sets it creates as it does the parts of the query. In this case 3 sets are created, set S0 has 14 files in it, set S1 has 3 files and the union of the two sets, S2, has 15 files. A description of the query that created any given set is kept along with the set and displayed when sets are printed.
The f s1 command lists the three files in set S1.
The off command terminates the example session.
This program interfaces nicely with emacs if you run the server program and specify the client program as your $PAGER.