Docs: Show whether an alias is deprecated

Change-type: patch
This commit is contained in:
myarmolinsky 2024-10-23 09:27:52 -04:00
parent 1275c11573
commit d4b554da1b

View File

@ -25,7 +25,14 @@ function renderOclifCommand(command: Category['commands'][0]): string[] {
const result = [`## ${ent.encode(command.name || '')}`];
if (command.aliases?.length) {
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(
`\nTo use one of the aliases, replace \`${command.name}\` with the alias.`,
);