Improved copy & quit options.

This commit is contained in:
2019-03-24 03:08:51 +01:00
parent 4065f3d4d6
commit e85a0f45f9
4 changed files with 14 additions and 10 deletions

View File

@@ -1,6 +1,7 @@
'use strict';
const blessed = require('neo-blessed');
const clipboard = require('clipboardy');
const argv = require('./argv');
const { renderReleases, renderScene } = require('./tui/render');
@@ -46,6 +47,11 @@ async function init() {
const method = getMethod();
const result = await method.fetch();
if (argv.copy && result.copy) {
clipboard.writeSync(result.copy);
console.log(`Result copied to clipboard: ${result.copy}`);
}
if (argv.render) {
method.render(result, screen);
}