Skip to content

Commit

Permalink
Minor fix to gen.go
Browse files Browse the repository at this point in the history
  • Loading branch information
kenshaw committed Dec 23, 2024
1 parent b836a21 commit cbd813a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion _examples/gen.go
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,7 @@ func (cmd *command) parse(ctx context.Context) error {
}
case sectAliases:
for _, str := range strings.Split(strings.TrimSpace(s), ",") {
if str = strings.TrimSpace(strings.TrimPrefix(str, cmd.String())); str != "" {
if str = strings.TrimSpace(strings.TrimPrefix(str, cmd.String())); str != "" && str != cmd.name {
cmd.aliases = append(cmd.aliases, str)
}
}
Expand Down

0 comments on commit cbd813a

Please sign in to comment.