Skip to content

Commit

Permalink
feat: one more help command prefix
Browse files Browse the repository at this point in the history
  • Loading branch information
RostiMelk committed Dec 11, 2024
1 parent 740e8b9 commit dec4ff2
Showing 1 changed file with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,10 @@ export function generateCommandsDocumentation(
'Commands:',
]
.concat(commands.map((cmd) => ` ${padEnd(cmd.name, cmdLength + 1)} ${cmd.description}`))
.concat(['', `See 'sanity help${prefix} <command>' for specific information on a subcommand.`])
.concat([
'',
`See 'npx sanity help${prefix} <command>' for specific information on a subcommand.`,
])

return rows.join('\n')
}
Expand All @@ -43,7 +46,7 @@ export function generateCommandDocumentation(
if (!command) {
throw new Error(
subCommand
? `"${subCommand}" is not a subcommand of "${group}". See 'sanity help ${group}'`
? `"${subCommand}" is not a subcommand of "${group}". See 'npx sanity help ${group}'`
: getNoSuchCommandText(group || command),
)
}
Expand Down

0 comments on commit dec4ff2

Please sign in to comment.