Skip to content

Commit

Permalink
fix: fixed bug in docs generation
Browse files Browse the repository at this point in the history
  • Loading branch information
MarvinJWendt committed Mar 16, 2022
1 parent 30a26e6 commit 634f85f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pcli.go
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ func generateMarkdownTree(cmd *cobra.Command) (md string) {
}
pterm.DisableColor()
if cmd.CommandPath() != rootCmd.CommandPath() {
md += pterm.Sprintfln("# ... %s", strings.TrimSpace(strings.TrimPrefix(cmd.CommandPath(), rootCmd.Use)))
md += pterm.Sprintfln("# ... %s", strings.TrimSpace(strings.TrimPrefix(cmd.CommandPath(), strings.Split(rootCmd.Use, " ")[0])))
md += pterm.Sprintfln("`%s`", cmd.CommandPath())
} else {
md += pterm.Sprintfln("# %s", cmd.CommandPath())
Expand Down

0 comments on commit 634f85f

Please sign in to comment.