mirror of
https://github.com/balena-io/balena-cli.git
synced 2024-12-18 21:27:51 +00:00
Docs: Show whether an alias is deprecated
Change-type: patch
This commit is contained in:
parent
1275c11573
commit
d4b554da1b
@ -25,7 +25,14 @@ function renderOclifCommand(command: Category['commands'][0]): string[] {
|
|||||||
const result = [`## ${ent.encode(command.name || '')}`];
|
const result = [`## ${ent.encode(command.name || '')}`];
|
||||||
if (command.aliases?.length) {
|
if (command.aliases?.length) {
|
||||||
result.push('### Aliases');
|
result.push('### Aliases');
|
||||||
result.push(command.aliases.map((alias) => `- \`${alias}\``).join('\n'));
|
result.push(
|
||||||
|
command.aliases
|
||||||
|
.map(
|
||||||
|
(alias) =>
|
||||||
|
`- \`${alias}\`${command.deprecateAliases ? ' *(deprecated)*' : ''}`,
|
||||||
|
)
|
||||||
|
.join('\n'),
|
||||||
|
);
|
||||||
result.push(
|
result.push(
|
||||||
`\nTo use one of the aliases, replace \`${command.name}\` with the alias.`,
|
`\nTo use one of the aliases, replace \`${command.name}\` with the alias.`,
|
||||||
);
|
);
|
||||||
|
Loading…
Reference in New Issue
Block a user