1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2025-12-20 07:17:59 +01:00

Add :yank command.

This commit is contained in:
Kris Maglione
2010-10-14 18:31:12 -04:00
parent 6cd4f05790
commit 9f9021e68e
7 changed files with 42 additions and 8 deletions

View File

@@ -1241,6 +1241,17 @@ const Commands = Module("commands", {
argCount: "1",
completer: function (context) completion.userCommand(context)
});
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]));
},
{
completer: function (context) completion.ex(context),
literal: 0
});
},
javascript: function () {
JavaScript.setCompleter([this.get, this.removeUserCommand],