mirror of
https://github.com/thelounge/thelounge
synced 2024-11-26 22:10:22 +00:00
Better --help output
This commit is contained in:
parent
b0cbb2ac11
commit
74d0765e00
4 changed files with 8 additions and 6 deletions
|
@ -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": {
|
||||
|
|
|
@ -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"}
|
||||
);
|
||||
});
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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() {
|
||||
|
|
Loading…
Reference in a new issue