Skip to content

Commit

Permalink
shell: trim leading and trailing hyphen from runbook alias
Browse files Browse the repository at this point in the history
  • Loading branch information
joshi4 committed May 5, 2024
1 parent 8130397 commit 7921b8d
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions shell/zsh.go
Original file line number Diff line number Diff line change
Expand Up @@ -257,6 +257,7 @@ func computeRunbookAlias(runbook *client.Runbook) string {
lc := strings.ToLower(runbook.Title)
alias := strings.ReplaceAll(lc, " ", "-")
alias, _ = strings.CutPrefix(alias, "how-to-")
alias = strings.Trim(alias, "-")
return alias
}

Expand Down

0 comments on commit 7921b8d

Please sign in to comment.