forked from DebaucheryLibrarian/traxxx
Improved copy & quit options.
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user