From 8bbc7c18aec5dcd4a91e451af91924dd3e566135 Mon Sep 17 00:00:00 2001 From: anekos Date: Sat, 27 Aug 2011 15:18:33 +0900 Subject: スタイル的な修正 --- umihara.js | 27 ++++++++++++++++----------- 1 file changed, 16 insertions(+), 11 deletions(-) diff --git a/umihara.js b/umihara.js index d5f950d..3b81918 100644 --- a/umihara.js +++ b/umihara.js @@ -1,5 +1,5 @@ /* {{{ -Copyright (c) 2008, anekos. +Copyright (c) 2008-2011, anekos. All rights reserved. Redistribution and use in source and binary forms, with or without modification, @@ -138,9 +138,10 @@ let PLUGIN_INFO = liberator.echo(
{msg});
}
- let resultBuffer = '';
function kawase (value, clipboard, from, to) {
+ let resultBuffer = '';
+
[from, to] = [from || defaultSource, to || defaultTarget].map(function (it) it.toUpperCase());
if (from == '-')
from = defaultSource;
@@ -174,6 +175,9 @@ let PLUGIN_INFO =
let extra = {
argCount: '+',
bang: true,
+ options: [
+ [['-clipboard', '-c'], commands.OPTION_NOARG],
+ ],
completer: function (context, args) {
if (args.length == 1) {
// TODO - history
@@ -190,22 +194,23 @@ let PLUGIN_INFO =
['kawase'],
'Umihara Kawase Meow',
function (args) {
- let as = args;
- resultBuffer = '';
liberator.echo('<