From 39f2fbcd2a81790444cc19b5de6ac349e4e86d98 Mon Sep 17 00:00:00 2001 From: anekos Date: Sat, 5 May 2012 16:16:23 +0900 Subject: Add subcommand "excommand" for :erection. --- erection.js | 24 +++++++++++++++++++++--- 1 file changed, 21 insertions(+), 3 deletions(-) (limited to 'erection.js') diff --git a/erection.js b/erection.js index 829cb46..be7e1d2 100644 --- a/erection.js +++ b/erection.js @@ -35,7 +35,7 @@ THE POSSIBILITY OF SUCH DAMAGE. // INFO {{{ let INFO = <> -

Show erected text with the image.

- ); }), subOption + ), + new Command( + ['e[xcommand]'], + 'Open command line with select erection', + makeErectionCommand(function (e, args) { + let cmdArgs = String(<>{e.text} - {e.by} {e.from} {e.imageURL}); + setTimeout(function () commandline.open('', args[0] + ' ' + cmdArgs, modes.EX), 1); + }), + { + literal: 1, + completer: function (context, args) { + if (args.length <= 1) { + completion.ex(context); + } else { + erectionCompleter(context, args); + } + } + } ) ] }, -- cgit v1.2.3