3 complete, freecompletion \- file name completion
9 .B #include <complete.h>
13 .ta \w' 'u +\w' 'u +\w' 'u +\w' 'u +\w' 'u
14 typedef struct Completion Completion;
31 Completion* complete(char *dir, char *s);
34 void freecompletion(Completion *c);
38 function implements file name completion.
43 it returns an analysis of the file names in that directory that begin with the string
49 will be set to the number of files that match the prefix and
51 will be filled in with their names.
52 If the file named is a directory, a slash character will be appended to it.
54 If no files match the string,
58 will return the full set of files in the directory, with
64 reports whether the string
66 can be extended without changing the set of files that match. If true,
68 will be set to the extension; that is, the value of
72 by the caller to extend the embryonic file name unambiguously.
76 reports whether the extended file name uniquely identifies a file.
79 will be suffixed with a blank, or a slash and a blank,
80 depending on whether the resulting file name identifies a plain file or a directory.
86 structure and its contents.
92 file name completion is triggered by a control-F character or an Insert character.
94 .B \*9/src/libcomplete
101 function returns a null pointer and sets
103 if the directory is unreadable or there is some other error.
105 The behavior of file name completion should be controlled by the plumber.