Support callback function for objects.
This commit is contained in:
parent
4df746a2d8
commit
c9257b3038
1 changed files with 5 additions and 1 deletions
|
@ -11,7 +11,11 @@ var __onTabCompleteJSP = function( result, cmdSender, pluginCmd, cmdAlias, cmdAr
|
|||
i;
|
||||
cmd = _commands[cmdInput];
|
||||
if ( cmd ) {
|
||||
opts = cmd.options;
|
||||
if (typeof cmd.options === 'function'){
|
||||
opts = cmd.options();
|
||||
} else {
|
||||
opts = cmd.options;
|
||||
}
|
||||
len = opts.length;
|
||||
if ( cmdArgs.length > 1 ) {
|
||||
// partial e.g. /jsp chat_color dar
|
||||
|
|
Reference in a new issue