xref: /plan9/sys/include/complete.h (revision abe9e455e154a9602b9c7d8f77012494da617202)
180e0677aSDavid du Colombier #pragma	lib	"libcomplete.a"
280e0677aSDavid du Colombier #pragma src "/sys/src/libcomplete"
380e0677aSDavid du Colombier 
480e0677aSDavid du Colombier typedef struct Completion Completion;
580e0677aSDavid du Colombier 
680e0677aSDavid du Colombier struct Completion{
780e0677aSDavid du Colombier 	uchar advance;		/* whether forward progress has been made */
880e0677aSDavid du Colombier 	uchar complete;	/* whether the completion now represents a file or directory */
980e0677aSDavid du Colombier 	char *string;		/* the string to advance, suffixed " " or "/" for file or directory */
10*abe9e455SDavid du Colombier 	int nmatch;		/* number of files that matched */
11*abe9e455SDavid du Colombier 	int nfile;			/* number of files returned */
1280e0677aSDavid du Colombier 	char **filename;	/* their names */
1380e0677aSDavid du Colombier };
1480e0677aSDavid du Colombier 
1580e0677aSDavid du Colombier Completion* complete(char *dir, char *s);
1680e0677aSDavid du Colombier void freecompletion(Completion*);
17