From ae485fc35dfe44d056a4cf1d5f50ab70c3d9c6a7 Mon Sep 17 00:00:00 2001 From: Kris Maglione Date: Thu, 14 Oct 2010 19:37:10 -0400 Subject: [PATCH] "Yanked {n} line(s)" --- common/content/commands.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/common/content/commands.js b/common/content/commands.js index f4833938..b2f6f18a 100644 --- a/common/content/commands.js +++ b/common/content/commands.js @@ -1245,8 +1245,10 @@ const Commands = Module("commands", { commands.add(["y[ank]"], "Yanks the output of the given command to the clipboard", function (args) { - dactyl.clipboardWrite( - commandline.withOutputToString(commands.execute, commands, args[0])); + let res = commandline.withOutputToString(commands.execute, commands, args[0]); + dactyl.clipboardWrite(res); + let lines = res.split("\n").length; + dactyl.echomsg("Yanked " + lines + " line" + (lines == 1 ? "" : "s")); }, { completer: function (context) completion.ex(context),