For undocumented reasons, groovysh uses an xml file to specify the commands to load into the shell, commands being "help", "history", etc. as presented here:
The xml file just lists the fully qualified Classname, which is then used to create instances of the classes. This happens in
which is invoked as default command registrar in
I fail to see any practical benefit to this, either right now or in theory. However doing so delays groovysh startup. On my machine it feels like I can get a 500ms decrease on my 4s total groovysh startup time by loading the commands from the code.