summaryrefslogtreecommitdiff
path: root/command.h
blob: ad344de8682309a2721f1d0d1ea3cb4e63e3de10 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27

#ifndef CMDTREE_COMMAND_H
#define CMDTREE_COMMAND_H

struct command {
	char *name;
	char *command;
	char *bind;
	struct command *children;
	int nchildren;
};


void
command_init(struct command *cmd);

void
command_exec(struct command *cmd);

int
command_is_prefix(struct command *cmd);

struct command *
command_lookup(struct command *cmd, int ncmds, const char *binding);


#endif /* CMDTREE_COMMAND_H */