summaryrefslogtreecommitdiff
path: root/module/complete.m
blob: 82495ef9d325dc68be41e261c86af049291b95d8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
Complete: module
{
	PATH:	con "/dis/lib/complete.dis";

	Completion: adt {
		advance: int;	# whether forward progress has been made
		complete: int;	# whether the completion now represents a file or directory
		str:	string;	# string to advance, suffixed " " (file) or "/" (directory)
		nmatch: int;	# number of files that matched
		filename:	array of string;	# their names
	};

	init: fn();
	complete: fn(dir, s: string): (ref Completion, string);
};