Merge pull request #18 from crazy-max/fix-yaml-longdesc

yaml: root command should also be removed for non-plugin (cli)
This commit is contained in:
Sebastiaan van Stijn 2022-01-19 14:01:07 +01:00 коммит произвёл GitHub
Родитель 6f00061a33 f468d10fef
Коммит 77df2afa21
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
1 изменённых файлов: 1 добавлений и 1 удалений

Просмотреть файл

@ -367,7 +367,7 @@ func (c *Client) loadLongDescription(parentCmd *cobra.Command) error {
}
}
name := cmd.CommandPath()
if i := strings.Index(name, " "); c.plugin && i >= 0 {
if i := strings.Index(name, " "); i >= 0 {
// remove root command / binary name
name = name[i+1:]
}