Skip to content

Commit

Permalink
fix: Doc command to generate id meta without space (#1046)
Browse files Browse the repository at this point in the history
* fix: Doc command to generate id meta without spacee

* Move completion long to example
  • Loading branch information
yevgenypats committed Jun 30, 2022
1 parent b304bbc commit be12ebf
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion cmd/completion.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ import (
var completionCmd = &cobra.Command{
Use: "completion [bash|zsh|fish|powershell]",
Short: "Generate completion script (run --help for full instructions)",
Long: `To load completions:
Example: `To load completions:
Bash:
Expand Down
4 changes: 2 additions & 2 deletions cmd/doc.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ sidebar_label: "%s"
`
name := filepath.Base(filename)
base := strings.TrimSuffix(name, path.Ext(name))
id := strings.ReplaceAll(base, "_", " ")
sidebarLabel := strings.TrimPrefix(id, "cloudquery ")
id := strings.TrimPrefix(base, "cloudquery_")
sidebarLabel := strings.ReplaceAll(id, "_", " ")
return fmt.Sprintf(fmTemplate, id, sidebarLabel)
}

Expand Down

0 comments on commit be12ebf

Please sign in to comment.