Skip to content

Commit e9f2631

Browse files
committed
command help display modify
1 parent 0655af3 commit e9f2631

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

src/Base/AbstractCommand.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -464,7 +464,8 @@ protected function showHelpByMethodAnnotations(string $method, string $action =
464464
$help = [];
465465

466466
if ($aliases) {
467-
$help['Alias Name:'] = implode(',', $aliases);
467+
$realName = $action ?: self::getName();
468+
$help['Command:'] = sprintf('%s(alias: <info>%s</info>)', $realName, implode(',', $aliases));
468469
}
469470

470471
foreach (array_keys(self::$annotationTags) as $tag) {

src/Command.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,6 @@ protected function showHelp(): bool
5959
return true;
6060
}
6161

62-
return $this->showHelpByMethodAnnotations('execute');
62+
return $this->showHelpByMethodAnnotations('execute', null, static::aliases());
6363
}
6464
}

0 commit comments

Comments
 (0)