AddCommand
AddCommand (command, file [, ...])
Function AddCommand is available to the _usermenu.lua script.
It establishes a correspondence between the given command and
the specified utility (file). This allows to call that utility
from the command line (or a macro).
Parameters
command
The first command line parameter after the plugin’s prefix.file
A specification for a Lua script to run upon this item activation. The exact file name is determined according to the same rules as withrequirefunction, that is,package.pathis used to search for the file. But contrary torequire, the value returned by the script is not cached inpackage.loaded.Extra parameters (optional)
Values that will be passed to user script (they are passed to the script in a table). There can be any number of values of any Lua type.
Examples
AddCommand("calc", "scripts.fl_scripts.common.calc")
AddCommand("umenu", "scripts.Rh_Scripts.LuaPUM.LuaPUM")