MXS-1300: Add TSV output to MaxCtrl

TSV output is a lot easier to parse compared to the pretty-printed
Unicode.
This commit is contained in:
Markus Mäkelä
2017-07-13 19:58:32 +03:00
parent 816e317485
commit b54e94ce95
2 changed files with 47 additions and 6 deletions

View File

@ -23,7 +23,7 @@ module.exports = function(argv) {
return new Promise(function(resolve, reject) {
program
.version(maxctrl_version)
.group(['u', 'p', 'h', 's', 't'], 'Global Options:')
.group(['u', 'p', 'h', 's', 't', 'tsv'], 'Global Options:')
.option('u', {
alias:'user',
global: true,
@ -56,6 +56,11 @@ module.exports = function(argv) {
default: '10000',
type: 'number'
})
.option('tsv', {
describe: 'Print tab separated output',
default: 'false',
type: 'boolean'
})
.command(require('./lib/list.js'))
.command(require('./lib/show.js'))