Command Groups

Command groups define groups of commands, wildcard patterns, or both, that match commands:

CREATE TABLE cmdgrp (
	id INTEGER PRIMARY,
	name TEXT UNIQUE,
	description TEXT,
	disabled INTEGER CHECK(disabled BETWEEN 0 AND 1)-- 0=enabled, 1=disabled
);
CREATE TABLE cmdlist (
	id INTEGER REFERENCES cmdgrp(id),
	cmd TEXT, -- "glob" wildcard
	rewrite TEXT, -- new command (see below)
	PRIMARY KEY(id,cmd)
);

Each command group has multiple command list entries that specify commands and/or wildcards that match the submitted command name when matched by the role, and a rewrite column to rewrite the command that is executed. The rewrite is in a similar format to Bourne/Bash shell arguments, for example, $0, $1, $*, $#etc. Rewrite uses the original command to substitute arguments into the new rewritten command.

A diagram demonstrating that each Command Group has multiple Command List entries.