From 7f6c358c1b6c244e6023a115f71cc2716637dc3b Mon Sep 17 00:00:00 2001 From: rafapaezbas Date: Mon, 17 Feb 2025 13:54:18 +0100 Subject: [PATCH] fixed subcommands help --- cmd/index.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/cmd/index.js b/cmd/index.js index 1f1372027..7a88b1092 100644 --- a/cmd/index.js +++ b/cmd/index.js @@ -1,5 +1,5 @@ 'use strict' -const { header, footer, command, flag, arg, summary, description, bail, sloppy } = require('paparam') +const { header, footer, command, flag, arg, summary, description, bail, sloppy, rest } = require('paparam') const { usage, print } = require('./iface') const { CHECKOUT } = require('../constants') const errors = require('../errors') @@ -199,8 +199,8 @@ module.exports = async (ipc, argv = Bare.argv.slice(1)) => { () => { console.log(data.help()) } ) - const help = command('help', arg('[command]'), summary('View help for command'), (h) => { - if (h.args.command) console.log(cmd.help(h.args.command)) + const help = command('help', rest('[command]'), summary('View help for command'), (h) => { + if (h.rest) console.log(cmd.help(...h.rest)) else console.log(cmd.overview({ full: true })) })