aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--bitly.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/bitly.js b/bitly.js
index e8db8dd..5d84906 100644
--- a/bitly.js
+++ b/bitly.js
@@ -138,11 +138,11 @@ let PLUGIN_INFO =
[name],
'Copy ' + domain + ' url',
function (args) {
- let url = util.stringToURLArray(args.literalArg)[0];
+ let url = args.literalArg ? util.stringToURLArray(args.literalArg)[0] : buffer.URL;
shorten(url || buffer.URL, domain, function (short) {
util.copyToClipboard(short);
- liberator.echo('`' + short + "' was copied to clipboard.");
+ liberator.echo(short + ' <= ' + url);
});
},
{