diff options
-rw-r--r-- | tombloo.js | 16 |
1 files changed, 7 insertions, 9 deletions
@@ -52,13 +52,14 @@ with (tomblooService) { commands.addUserCommand( ['tomblooAction'], 'Execute Tombloo actions', - function (arg) { - let f = Tombloo.Service.actions[arg.string]; + function (args) { + let f = Tombloo.Service.actions[args.literalArg]; (f instanceof Function) ? f.execute() - : liberator.echoerr(arg.string + ' is not Tombloo Action.'); + : liberator.echoerr(args.literalArg + ' is not Tombloo Action.'); }, { + literal: 0, completer: function (context) { context.title = ['Tombloo Actions']; @@ -76,17 +77,14 @@ commands.addUserCommand( ['tombloo'], 'Post by Tombloo', function (args) { - //let f = Tombloo.Service.extractors[args.string]; - let arg = args.string.replace(/\\(?=\u0020)/g, ''); - liberator.log(args.string, 0); - liberator.log(arg, 0); - - let f = Tombloo.Service.extractors[arg]; + liberator.log(args.literalArg, 0); + let f = Tombloo.Service.extractors[args.literalArg]; (typeof f === 'object') ? Tombloo.Service.share(getContext(), f, args.bang) : liberator.echoerr(args.string + ' is not Tombloo command'); }, { + literal: 0, bang: true, completer: function (context) { context.title = ['Tombloo']; |