MXS-1300: Add usage to all commands
Added usage instructions for all commands. If the generated usage is used with the `pkg` packager, it will contain generated script names which are confusing.
This commit is contained in:
parent
4cf17bc450
commit
8fb1137ef0
@ -21,8 +21,9 @@ exports.builder = function(yargs) {
|
||||
var target = 'servers/' + argv.server + "/clear?status=" + argv.status
|
||||
doRequest(target, null, {method: "POST"})
|
||||
})
|
||||
.usage("Usage: clear <command>")
|
||||
.help()
|
||||
.command('*', 'the default command', {}, () => {
|
||||
console.log("Unknown command. See output of 'help clear' for a list of commands.")
|
||||
})
|
||||
.help()
|
||||
}
|
||||
|
@ -65,8 +65,9 @@ exports.builder = function(yargs) {
|
||||
{'Version': 'attributes.version'}
|
||||
])
|
||||
})
|
||||
.usage("Usage: list <command>")
|
||||
.help()
|
||||
.command('*', 'the default command', {}, () => {
|
||||
console.log("Unknown command. See output of 'help list' for a list of commands.")
|
||||
})
|
||||
.help()
|
||||
}
|
||||
|
@ -21,8 +21,9 @@ exports.builder = function(yargs) {
|
||||
var target = 'servers/' + argv.server + "/set?status=" + argv.status
|
||||
doRequest(target, null, {method: "POST"})
|
||||
})
|
||||
.usage("Usage: set <command>")
|
||||
.help()
|
||||
.command('*', 'the default command', {}, () => {
|
||||
console.log("Unknown command. See output of 'help set' for a list of commands.")
|
||||
})
|
||||
.help()
|
||||
}
|
||||
|
@ -83,8 +83,9 @@ exports.builder = function(yargs) {
|
||||
{'Commands': 'attributes.commands'}
|
||||
])
|
||||
})
|
||||
.usage("Usage: show <command>")
|
||||
.help()
|
||||
.command('*', 'the default command', {}, () => {
|
||||
console.log("Unknown command. See output of 'help show' for a list of commands.")
|
||||
})
|
||||
.help()
|
||||
}
|
||||
|
@ -54,7 +54,6 @@ program
|
||||
.command(require('./lib/show.js'))
|
||||
.command(require('./lib/set.js'))
|
||||
.command(require('./lib/clear.js'))
|
||||
.recommendCommands()
|
||||
.help()
|
||||
.demandCommand(1, 'At least one command is required')
|
||||
.command('*', 'the default command', {}, () => {
|
||||
|
Loading…
x
Reference in New Issue
Block a user