/* autogenerated - do not edit */
#include <jim.h>
int Jim_ensembleInit(Jim_Interp *interp)
{
	if (Jim_PackageProvide(interp, "ensemble", "1.0", JIM_ERRMSG)) return JIM_ERR;
	return Jim_EvalSource(interp, "ensemble.tcl", 1, "\n"
"\n"
"proc ensemble {command args} {\n"
"	set autoprefix \"$command \"\n"
"	set badopts \"should be \\\"ensemble command ?-automap prefix?\\\"\"\n"
"	if {[llength $args] % 2 != 0} {\n"
"		return -code error \"wrong # args: $badopts\"\n"
"	}\n"
"	foreach {opt value} $args {\n"
"		switch -- $opt {\n"
"			-automap { set autoprefix $value }\n"
"			default { return -code error \"wrong # args: $badopts\" }\n"
"		}\n"
"	}\n"
"	proc $command {subcmd args} {autoprefix {mapping {}}} {\n"
"		if {![dict exists $mapping $subcmd]} {\n"
"\n"
"			if {$subcmd in {-commands -help}} {\n"
"\n"
"				set prefixlen [string length $autoprefix]\n"
"				set subcmds [lmap p [lsort [info commands $autoprefix*]] {\n"
"					string range $p $prefixlen end\n"
"				}]\n"
"				if {$subcmd eq \"-commands\"} {\n"
"					return $subcmds\n"
"				}\n"
"				set command [lindex [info level 0] 0]\n"
"				return \"Usage: \\\"$command command ... \\\", where command is one of: [join $subcmds \", \"]\"\n"
"			}\n"
"\n"
"			dict set mapping $subcmd ${autoprefix}$subcmd\n"
"		}\n"
"\n"
"		tailcall [dict get $mapping $subcmd] {*}$args\n"
"	}\n"
"}\n");
}
