Better --help output

This commit is contained in:
Mattias Erming 2014-09-09 13:06:26 -07:00
parent b0cbb2ac11
commit 74d0765e00
4 changed files with 8 additions and 6 deletions

View File

@ -1,7 +1,7 @@
{
"name": "shout",
"description": "A web IRC client",
"version": "0.17.0",
"version": "0.17.1",
"author": "Mattias Erming",
"preferGlobal": true,
"bin": {

View File

@ -1,13 +1,15 @@
var program = require("commander");
var child = require("child_process");
var CONFIG_PATH = process.cwd() + "/config.json";
program
.command("config")
.description("Open the config")
.description("Edit config: '" + CONFIG_PATH + "'")
.action(function() {
child.spawn(
"sudo",
["vi", process.cwd() + "/config.json"],
["vi", CONFIG_PATH],
{stdio: "inherit"}
);
});

View File

@ -6,7 +6,7 @@ const HOME = process.env.HOME + "/.shout";
program
.command("edit <name>")
.description("Edit an existing user")
.description("Edit user: '" + HOME + "/users/<name>/user.json'")
.action(function(name) {
var users = new ClientManager().getUsers();
if (users.indexOf(name) === -1) {

View File

@ -4,8 +4,8 @@ var program = require("commander");
var shout = require("../server");
program
.option("-h, --host <ip>")
.option("-p, --port <port>")
.option("-h, --host <ip>", "host")
.option("-p, --port <port>", "port")
.command("start")
.description("Start the server")
.action(function() {