This spoon lets execute commands from other spoon by a chooser.
The way of Commander to generate it command list is
it goes to each spoon and extract all public functions inside the spoon table.
for each function the name is set to "spoonName.functionName".
if the spoon has a table called commandderCommandTable
, Commander will
ignore everything else and take whatever is in the table.
In this case the naming convention is the same.
Then Commander grabs all the functions in global table.
functions are tested against Commander.ignoredCommandList
,
except when spoon author provides a commanderCommandList
.
Commander.chooser is the chooser, you can set background color, rows, etc, to it.
Signature | Commander.commandTable |
---|---|
Type | Variable |
Description | This is the table which stores all the commands |
Notes |
|
Source | Source/Commander.spoon/init.lua line 33 |
Signature | Commander.forceLayout |
---|---|
Type | Variable |
Description | If you want to switch to a layout when enabled chooser, set this to name of that layout |
Source | Source/Commander.spoon/init.lua line 54 |
Signature | Commander.forceMethod |
---|---|
Type | Variable |
Description | If you want to switch to a method when enabled chooser, set this to name of that method |
Source | Source/Commander.spoon/init.lua line 59 |
Signature | Commander.ignoredCommandList |
---|---|
Type | Variable |
Description | This list contains all the ignored function names, any function matches the name inside this list will not be added to Commander.commandTable. |
Notes |
|
Source | Source/Commander.spoon/init.lua line 41 |
Signature | Commander.addCommand(commandTable) |
---|---|
Type | Function |
Description | Add a command to Commander.commandTable |
Parameters |
|
Returns | |
Notes |
|
Source | Source/Commander.spoon/init.lua line 124 |
Signature | Commander.resetCommandTable() |
---|---|
Type | Function |
Description | This function simply set Commander.commandTable to {}, then the next time commander chooser is called it will generate the table again. |
Parameters |
|
Returns | |
Source | Source/Commander.spoon/init.lua line 137 |
Signature | Commander.show() |
---|---|
Type | Function |
Description | This function shows the command chooser. Bind this to a hotkey to use commander. |
Parameters |
|
Returns | |
Source | Source/Commander.spoon/init.lua line 64 |