diff --git a/CHANGES.md b/CHANGES.md index 1a03147..668971c 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -2,28 +2,46 @@ ## 4.0.0 (not yet released) -- Much improved Bash completion. +- [backwards incompat] #66 New consistent `triton` CLI style. See [the + issue](https://github.com/joyent/node-triton/issues/66) for discussion. -- XXX changes in `triton instance,key,network,account`. - Drops `triton whoami`. Want to keep that? + The major changes is that where some sub-commands used to be some + flavour of: + + triton things # list all the things + triton thing ID # get a thing + triton thing -a ID # create a new thing + + Now commands are consistently: + + triton thing list # list all the things + triton thing get ID # get a thing + triton thing create ... # create a new thing + ... + + The most annoying incompatility is the need for "get" to + get a thing. E.g.: + + BEFORE AFTER + triton img blah triton img get blah + triton inst web0 triton inst get web0 + + For *listing* things, there is typically a shortcut with + the old form, e.g. `triton images` is a shortcut for + `triton image list`. + + Currently all of the CLI *except* the experimental `triton rbac ...` + is converted to the new consistent style. + +- [backwards incompat] `triton whoami` was dropped. This used to be a shortcut + for `triton account get`. It could possibly come back. + +- *Much* improved Bash completion. - Add the ability to create a profile copying from an existing profile, via `triton profile create --copy NAME`. -- [backwards incompat] #66 `triton profile` now has list, get, etc. sub-commands. - One backwards incompatible change here is that `triton profile NAME` is - now `triton profile get NAME`. Note that for bwcompat `triton profiles` is - a shortcut for `triton profile list`. - -- [backwards incompat] #66 `triton image` now has list, get sub-commands. - One backwards incompatible change here is that `triton image ID|NAME` is - now `triton image get ID|NAME`. Note that for bwcompat `triton images` is - a shortcut for `triton image list`. - -- [backwards incompat] #66 `triton package` now has list, get sub-commands. - One backwards incompatible change here is that `triton package ID|NAME` is - now `triton package get ID|NAME`. Note that for bwcompat `triton packages` is - a shortcut for `triton package list`. +- `triton key add` was added (). ## 3.6.1 (not yet released) diff --git a/lib/do_create.js b/lib/do_create.js index 2339566..0a9c0a8 100644 --- a/lib/do_create.js +++ b/lib/do_create.js @@ -5,21 +5,20 @@ */ /* - * Copyright 2015 Joyent, Inc. + * Copyright 2016 Joyent, Inc. * * `triton create ...` bwcompat shortcut for `triton instance create ...`. */ function do_create(subcmd, opts, args, callback) { - var subcmdArgv = ['node', 'triton', 'instance', 'create'].concat(args); - this.dispatch('instance', subcmdArgv, callback); + this.handlerFromSubcmd('instance').dispatch({ + subcmd: 'create', + opts: opts, + args: args + }, callback); } -do_create.help = [ - 'A shortcut for "triton instance create".', - '', - 'Usage:', - ' {{name}} create ...' -].join('\n'); +do_create.help = 'A shortcut for "triton instance create".'; +do_create.options = require('./do_instance/do_create').options; module.exports = do_create; diff --git a/lib/do_delete.js b/lib/do_delete.js index c030159..3c47c5b 100644 --- a/lib/do_delete.js +++ b/lib/do_delete.js @@ -5,23 +5,21 @@ */ /* - * Copyright 2015 Joyent, Inc. + * Copyright 2016 Joyent, Inc. * * `triton delete ...` bwcompat shortcut for `triton instance delete ...`. */ function do_delete(subcmd, opts, args, callback) { - var subcmdArgv = ['node', 'triton', 'instance', 'delete'].concat(args); - this.dispatch('instance', subcmdArgv, callback); + this.handlerFromSubcmd('instance').dispatch({ + subcmd: 'delete', + opts: opts, + args: args + }, callback); } -do_delete.help = [ - 'A shortcut for "triton instance delete".', - '', - 'Usage:', - ' {{name}} delete ...' -].join('\n'); - +do_delete.help = 'A shortcut for "triton instance delete".'; do_delete.aliases = ['rm']; +do_delete.options = require('./do_instance/do_delete').options; module.exports = do_delete; diff --git a/lib/do_image/do_get.js b/lib/do_image/do_get.js index af32f26..aaa71a9 100644 --- a/lib/do_image/do_get.js +++ b/lib/do_image/do_get.js @@ -5,7 +5,7 @@ */ /* - * Copyright 2015 Joyent, Inc. + * Copyright 2016 Joyent, Inc. * * `triton image get ...` */ @@ -55,7 +55,7 @@ do_get.help = ( 'Get an image.\n' + '\n' + 'Usage:\n' + - ' {{name}} image get [] ID|NAME\n' + + ' {{name}} get [] ID|NAME\n' + '\n' + '{{options}}' + '\n' + diff --git a/lib/do_image/do_list.js b/lib/do_image/do_list.js index 35f909f..11304e5 100644 --- a/lib/do_image/do_list.js +++ b/lib/do_image/do_list.js @@ -130,7 +130,7 @@ do_list.help = ( 'List images.\n' + '\n' + 'Usage:\n' + - ' {{name}} image list [] []\n' + + ' {{name}} list [] []\n' + '\n' + '{{options}}' + '\n' + diff --git a/lib/do_images.js b/lib/do_images.js index fa8afcd..523da8c 100644 --- a/lib/do_images.js +++ b/lib/do_images.js @@ -5,25 +5,22 @@ */ /* - * Copyright 2015 Joyent, Inc. + * Copyright 2016 Joyent, Inc. * * `triton images ...` bwcompat shortcut for `triton image list ...`. */ function do_images(subcmd, opts, args, callback) { - var subcmdArgv = ['node', 'triton', 'image', 'list'].concat(args); - this.dispatch('image', subcmdArgv, callback); + this.handlerFromSubcmd('image').dispatch({ + subcmd: 'list', + opts: opts, + args: args + }, callback); } -do_images.help = [ - 'A shortcut for "triton image list".', - '', - 'Usage:', - ' {{name}} images ...' -].join('\n'); - +do_images.help = 'A shortcut for "triton image list".'; do_images.aliases = ['imgs']; - do_images.hidden = true; +do_images.options = require('./do_image/do_list').options; module.exports = do_images; diff --git a/lib/do_instance/do_create.js b/lib/do_instance/do_create.js index 89c348c..f10c519 100644 --- a/lib/do_instance/do_create.js +++ b/lib/do_instance/do_create.js @@ -307,7 +307,7 @@ function do_create(subcmd, opts, args, cb) { vasync.pipeline({arg: {}, funcs: [ function loadMetadata(ctx, next) { - metadataFromOpts(opts, self.log, function (err, metadata) { + metadataFromOpts(opts, log, function (err, metadata) { if (err) { next(err); return; @@ -321,7 +321,7 @@ function do_create(subcmd, opts, args, cb) { }); }, function loadTags(ctx, next) { - tagsFromOpts(opts, self.log, function (err, tags) { + tagsFromOpts(opts, log, function (err, tags) { if (err) { next(err); return; diff --git a/lib/do_instance/do_delete.js b/lib/do_instance/do_delete.js new file mode 100644 index 0000000..e590c60 --- /dev/null +++ b/lib/do_instance/do_delete.js @@ -0,0 +1,17 @@ +/* + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + */ + +/* + * Copyright 2016 Joyent, Inc. + * + * `triton instance delete ...` + */ + +var gen_do_ACTION = require('./gen_do_ACTION'); + + +var do_delete = gen_do_ACTION({action: 'delete', aliases: ['rm']}); +module.exports = do_delete; diff --git a/lib/do_instance/do_get.js b/lib/do_instance/do_get.js index 29536c4..6e720c5 100644 --- a/lib/do_instance/do_get.js +++ b/lib/do_instance/do_get.js @@ -50,7 +50,7 @@ do_get.help = ( 'Get an instance.\n' + '\n' + 'Usage:\n' - + ' {{name}} instance \n' + + ' {{name}} get \n' + '\n' + '{{options}}' + '\n' diff --git a/lib/do_instance/do_list.js b/lib/do_instance/do_list.js index 9851343..54ec521 100644 --- a/lib/do_instance/do_list.js +++ b/lib/do_instance/do_list.js @@ -146,7 +146,7 @@ do_list.help = ( 'List instances.\n' + '\n' + 'Usage:\n' - + ' {{name}} instance list [...]\n' + + ' {{name}} list [...]\n' + '\n' + '{{options}}' ); diff --git a/lib/do_instance/do_reboot.js b/lib/do_instance/do_reboot.js new file mode 100644 index 0000000..2a64990 --- /dev/null +++ b/lib/do_instance/do_reboot.js @@ -0,0 +1,17 @@ +/* + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + */ + +/* + * Copyright 2016 Joyent, Inc. + * + * `triton instance reboot ...` + */ + +var gen_do_ACTION = require('./gen_do_ACTION'); + + +var do_reboot = gen_do_ACTION({action: 'reboot'}); +module.exports = do_reboot; diff --git a/lib/do_instance/do_start.js b/lib/do_instance/do_start.js new file mode 100644 index 0000000..0adfa03 --- /dev/null +++ b/lib/do_instance/do_start.js @@ -0,0 +1,17 @@ +/* + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + */ + +/* + * Copyright 2016 Joyent, Inc. + * + * `triton instance start ...` + */ + +var gen_do_ACTION = require('./gen_do_ACTION'); + + +var do_start = gen_do_ACTION({action: 'start'}); +module.exports = do_start; diff --git a/lib/do_instance/do_stop.js b/lib/do_instance/do_stop.js new file mode 100644 index 0000000..5c170f7 --- /dev/null +++ b/lib/do_instance/do_stop.js @@ -0,0 +1,17 @@ +/* + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + */ + +/* + * Copyright 2016 Joyent, Inc. + * + * `triton instance stop ...` + */ + +var gen_do_ACTION = require('./gen_do_ACTION'); + + +var do_stop = gen_do_ACTION({action: 'stop'}); +module.exports = do_stop; diff --git a/lib/do_instance/gen_do_ACTION.js b/lib/do_instance/gen_do_ACTION.js index 8a13fab..f813e6d 100644 --- a/lib/do_instance/gen_do_ACTION.js +++ b/lib/do_instance/gen_do_ACTION.js @@ -7,6 +7,7 @@ /* * Copyright 2015 Joyent, Inc. * + * Shared support for: * `triton instance start ...` * `triton instance stop ...` * `triton instance reboot ...` diff --git a/lib/do_instance/index.js b/lib/do_instance/index.js index 1279a9e..9c43dab 100644 --- a/lib/do_instance/index.js +++ b/lib/do_instance/index.js @@ -13,8 +13,6 @@ var Cmdln = require('cmdln').Cmdln; var util = require('util'); -var gen_do_ACTION = require('./gen_do_ACTION'); - // ---- CLI class @@ -57,12 +55,11 @@ InstanceCLI.prototype.init = function init(opts, args, cb) { InstanceCLI.prototype.do_list = require('./do_list'); InstanceCLI.prototype.do_get = require('./do_get'); InstanceCLI.prototype.do_create = require('./do_create'); -InstanceCLI.prototype.do_delete = gen_do_ACTION( - {action: 'delete', aliases: ['rm']}); +InstanceCLI.prototype.do_delete = require('./do_delete'); -InstanceCLI.prototype.do_start = gen_do_ACTION({action: 'start'}); -InstanceCLI.prototype.do_stop = gen_do_ACTION({action: 'stop'}); -InstanceCLI.prototype.do_reboot = gen_do_ACTION({action: 'reboot'}); +InstanceCLI.prototype.do_start = require('./do_start'); +InstanceCLI.prototype.do_stop = require('./do_stop'); +InstanceCLI.prototype.do_reboot = require('./do_reboot'); InstanceCLI.prototype.do_ssh = require('./do_ssh'); InstanceCLI.prototype.do_wait = require('./do_wait'); diff --git a/lib/do_instances.js b/lib/do_instances.js index 5bcaff7..00bd383 100644 --- a/lib/do_instances.js +++ b/lib/do_instances.js @@ -5,23 +5,21 @@ */ /* - * Copyright 2015 Joyent, Inc. + * Copyright 2016 Joyent, Inc. * * `triton instances ...` bwcompat shortcut for `triton instance list ...`. */ function do_instances(subcmd, opts, args, callback) { - var subcmdArgv = ['node', 'triton', 'instance', 'list'].concat(args); - this.dispatch('instance', subcmdArgv, callback); + this.handlerFromSubcmd('instance').dispatch({ + subcmd: 'list', + opts: opts, + args: args + }, callback); } -do_instances.help = [ - 'A shortcut for "triton instance list".', - '', - 'Usage:', - ' {{name}} instances ...' -].join('\n'); - +do_instances.help = 'A shortcut for "triton instance list".'; do_instances.aliases = ['insts', 'ls']; +do_instances.options = require('./do_instance/do_list').options; module.exports = do_instances; diff --git a/lib/do_key/do_add.js b/lib/do_key/do_add.js index f0422d3..d767006 100644 --- a/lib/do_key/do_add.js +++ b/lib/do_key/do_add.js @@ -132,7 +132,6 @@ do_add.help = [ ' {{name}} add [] FILE', '', '{{options}}', - '', 'Where "FILE" must be a file path to an SSH public key, ', 'or "-" to pass the public key in on stdin.' ].join('\n'); diff --git a/lib/do_key/do_delete.js b/lib/do_key/do_delete.js index e9b4309..db7a8af 100644 --- a/lib/do_key/do_delete.js +++ b/lib/do_key/do_delete.js @@ -108,10 +108,9 @@ do_delete.help = [ 'Remove an SSH key from an account.', '', 'Usage:', - ' {{name}} delete [] FILE', + ' {{name}} delete [] KEY [KEY...]', '', '{{options}}', - '', 'Where "KEY" is an SSH key "name" or "fingerprint".' ].join('\n'); diff --git a/lib/do_key/do_list.js b/lib/do_key/do_list.js index e03a197..a6ddd1a 100644 --- a/lib/do_key/do_list.js +++ b/lib/do_key/do_list.js @@ -85,8 +85,8 @@ do_list.options = [ { names: ['authorized-keys', 'A'], type: 'bool', - help: 'Just output public key data -- i.e. output appropriate for a ' + - '"~/.ssh/authorized_keys" file.' + help: 'Just output public key data, one per line -- i.e. output ' + + 'appropriate for a "~/.ssh/authorized_keys" file.' } ]); @@ -96,11 +96,7 @@ do_list.help = [ 'Usage:', ' {{name}} list []', '', - '{{options}}', - '', - 'By default this lists just the key content for each key -- in other', - 'words, content appropriate for a "~/.ssh/authorized_keys" file.', - 'Use `triton keys -j` to see all fields.' + '{{options}}' ].join('\n'); do_list.aliases = ['ls']; diff --git a/lib/do_keys.js b/lib/do_keys.js index 5dffa69..4e49094 100644 --- a/lib/do_keys.js +++ b/lib/do_keys.js @@ -5,23 +5,21 @@ */ /* - * Copyright 2015 Joyent, Inc. + * Copyright 2016 Joyent, Inc. * - * `triton keys ...` bwcompat shortcut for `triton keys list ...`. + * `triton keys ...` bwcompat shortcut for `triton key list ...`. */ function do_keys(subcmd, opts, args, callback) { - var subcmdArgv = ['node', 'triton', 'key', 'list'].concat(args); - this.dispatch('key', subcmdArgv, callback); + this.handlerFromSubcmd('key').dispatch({ + subcmd: 'list', + opts: opts, + args: args + }, callback); } -do_keys.help = [ - 'A shortcut for "triton key list".', - '', - 'Usage:', - ' {{name}} key ...' -].join('\n'); - +do_keys.help = 'A shortcut for "triton key list".'; do_keys.hidden = true; +do_keys.options = require('./do_key/do_list').options; module.exports = do_keys; diff --git a/lib/do_networks.js b/lib/do_networks.js index 5cc7c63..b71779e 100644 --- a/lib/do_networks.js +++ b/lib/do_networks.js @@ -11,17 +11,15 @@ */ function do_networks(subcmd, opts, args, callback) { - var subcmdArgv = ['node', 'triton', 'network', 'list'].concat(args); - this.dispatch('network', subcmdArgv, callback); + this.handlerFromSubcmd('network').dispatch({ + subcmd: 'list', + opts: opts, + args: args + }, callback); } -do_networks.help = [ - 'A shortcut for "triton network list".', - '', - 'Usage:', - ' {{name}} networks ...' -].join('\n'); - +do_networks.help = 'A shortcut for "triton network list".'; do_networks.hidden = true; +do_networks.options = require('./do_network/do_list').options; module.exports = do_networks; diff --git a/lib/do_package/do_get.js b/lib/do_package/do_get.js index 4e2f5f7..f710a91 100644 --- a/lib/do_package/do_get.js +++ b/lib/do_package/do_get.js @@ -55,7 +55,7 @@ do_get.help = ( 'Get a package.\n' + '\n' + 'Usage:\n' + - ' {{name}} package get [] ID|NAME\n' + + ' {{name}} get [] ID|NAME\n' + '\n' + '{{options}}' + '\n' + diff --git a/lib/do_package/do_list.js b/lib/do_package/do_list.js index c810a38..72bdd4d 100644 --- a/lib/do_package/do_list.js +++ b/lib/do_package/do_list.js @@ -159,7 +159,7 @@ do_list.help = [ 'List packages.', '', 'Usage:', - ' {{name}} package list []', + ' {{name}} list []', '', '{{options}}', 'Filters:', diff --git a/lib/do_packages.js b/lib/do_packages.js index c853c7e..f80c2d5 100644 --- a/lib/do_packages.js +++ b/lib/do_packages.js @@ -5,25 +5,22 @@ */ /* - * Copyright 2015 Joyent, Inc. + * Copyright 2016 Joyent, Inc. * * `triton packages ...` bwcompat shortcut for `triton package list ...`. */ function do_packages(subcmd, opts, args, callback) { - var subcmdArgv = ['node', 'triton', 'package', 'list'].concat(args); - this.dispatch('package', subcmdArgv, callback); + this.handlerFromSubcmd('package').dispatch({ + subcmd: 'list', + opts: opts, + args: args + }, callback); } -do_packages.help = [ - 'A shortcut for "triton package list".', - '', - 'Usage:', - ' {{name}} packages ...' -].join('\n'); - +do_packages.help = 'A shortcut for "triton package list".'; do_packages.aliases = ['pkgs']; - do_packages.hidden = true; +do_packages.options = require('./do_package/do_list').options; module.exports = do_packages; diff --git a/lib/do_profiles.js b/lib/do_profiles.js index 76331d0..23ab4f5 100644 --- a/lib/do_profiles.js +++ b/lib/do_profiles.js @@ -5,23 +5,21 @@ */ /* - * Copyright 2015 Joyent, Inc. + * Copyright 2016 Joyent, Inc. * * `triton profiles ...` bwcompat shortcut for `triton profile list ...`. */ function do_profiles(subcmd, opts, args, callback) { - var subcmdArgv = ['node', 'triton', 'profile', 'list'].concat(args); - this.dispatch('profile', subcmdArgv, callback); + this.handlerFromSubcmd('profile').dispatch({ + subcmd: 'list', + opts: opts, + args: args + }, callback); } -do_profiles.help = [ - 'A shortcut for "triton profile list".', - '', - 'Usage:', - ' {{name}} profiles ...' -].join('\n'); - +do_profiles.help = 'A shortcut for "triton profile list".'; +do_profiles.options = require('./do_profile/do_list').options; do_profiles.hidden = true; module.exports = do_profiles; diff --git a/lib/do_reboot.js b/lib/do_reboot.js index 9474239..8701147 100644 --- a/lib/do_reboot.js +++ b/lib/do_reboot.js @@ -5,21 +5,20 @@ */ /* - * Copyright 2015 Joyent, Inc. + * Copyright 2016 Joyent, Inc. * * `triton reboot ...` bwcompat shortcut for `triton instance reboot ...`. */ function do_reboot(subcmd, opts, args, callback) { - var subcmdArgv = ['node', 'triton', 'instance', 'reboot'].concat(args); - this.dispatch('instance', subcmdArgv, callback); + this.handlerFromSubcmd('instance').dispatch({ + subcmd: 'reboot', + opts: opts, + args: args + }, callback); } -do_reboot.help = [ - 'A shortcut for "triton instance reboot".', - '', - 'Usage:', - ' {{name}} reboot ...' -].join('\n'); +do_reboot.help = 'A shortcut for "triton instance reboot".'; +do_reboot.options = require('./do_instance/do_reboot').options; module.exports = do_reboot; diff --git a/lib/do_ssh.js b/lib/do_ssh.js index 60d967c..6695f14 100644 --- a/lib/do_ssh.js +++ b/lib/do_ssh.js @@ -11,15 +11,14 @@ */ function do_ssh(subcmd, opts, args, callback) { - var subcmdArgv = ['node', 'triton', 'instance', 'ssh'].concat(args); - this.dispatch('instance', subcmdArgv, callback); + this.handlerFromSubcmd('instance').dispatch({ + subcmd: 'ssh', + opts: opts, + args: args + }, callback); } -do_ssh.help = [ - 'A shortcut for "triton instance ssh".', - '', - 'Usage:', - ' {{name}} ssh ...' -].join('\n'); +do_ssh.help = 'A shortcut for "triton instance ssh".'; +do_ssh.options = require('./do_instance/do_ssh').options; module.exports = do_ssh; diff --git a/lib/do_start.js b/lib/do_start.js index 9478a7a..15e491c 100644 --- a/lib/do_start.js +++ b/lib/do_start.js @@ -5,21 +5,20 @@ */ /* - * Copyright 2015 Joyent, Inc. + * Copyright 2016 Joyent, Inc. * * `triton start ...` bwcompat shortcut for `triton instance start ...`. */ function do_start(subcmd, opts, args, callback) { - var subcmdArgv = ['node', 'triton', 'instance', 'start'].concat(args); - this.dispatch('instance', subcmdArgv, callback); + this.handlerFromSubcmd('instance').dispatch({ + subcmd: 'start', + opts: opts, + args: args + }, callback); } -do_start.help = [ - 'A shortcut for "triton instance start".', - '', - 'Usage:', - ' {{name}} start ...' -].join('\n'); +do_start.help = 'A shortcut for "triton instance start".'; +do_start.options = require('./do_instance/do_start').options; module.exports = do_start; diff --git a/lib/do_stop.js b/lib/do_stop.js index 008b0d3..1d3985c 100644 --- a/lib/do_stop.js +++ b/lib/do_stop.js @@ -5,21 +5,20 @@ */ /* - * Copyright 2015 Joyent, Inc. + * Copyright 2016 Joyent, Inc. * * `triton stop ...` bwcompat shortcut for `triton instance stop ...`. */ function do_stop(subcmd, opts, args, callback) { - var subcmdArgv = ['node', 'triton', 'instance', 'stop'].concat(args); - this.dispatch('instance', subcmdArgv, callback); + this.handlerFromSubcmd('instance').dispatch({ + subcmd: 'stop', + opts: opts, + args: args + }, callback); } -do_stop.help = [ - 'A shortcut for "triton instance stop".', - '', - 'Usage:', - ' {{name}} stop ...' -].join('\n'); +do_stop.help = 'A shortcut for "triton instance stop".'; +do_stop.options = require('./do_instance/do_stop').options; module.exports = do_stop; diff --git a/package.json b/package.json index 08a6c6f..adb8fcc 100644 --- a/package.json +++ b/package.json @@ -8,7 +8,7 @@ "backoff": "2.4.1", "bigspinner": "3.1.0", "bunyan": "1.5.1", - "cmdln": "3.5.0", + "cmdln": "3.5.2", "extsprintf": "1.0.2", "lomstream": "1.1.0", "mkdirp": "0.5.1", diff --git a/test/integration/cli-networks.test.js b/test/integration/cli-networks.test.js index 7c4d29d..4a3cb32 100644 --- a/test/integration/cli-networks.test.js +++ b/test/integration/cli-networks.test.js @@ -40,7 +40,8 @@ test('triton networks', function (tt) { h.triton('help networks', function (err, stdout, stderr) { if (h.ifErr(t, err)) return t.end(); - t.ok(/Usage:\s+triton networks/.test(stdout)); + // JSSTYLED + t.ok(/shortcut for "triton network list"/.test(stdout)); t.end(); }); });