Skip to content

Commit

Permalink
man: renamed action
Browse files Browse the repository at this point in the history
  • Loading branch information
rsteube committed Mar 6, 2024
1 parent 02fc0cb commit 213d371
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion completers/man_completer/cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ func init() {
if rootCmd.Flag("local-file").Changed {
return carapace.ActionFiles(".man")
}
return man.ActionManPages()
return man.ActionPages()
}),
)
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@ import (
"github.com/rsteube/carapace"
)

// ActionManPages completes manpages
// ActionPages completes man pages
//
// git (the stupid content tracker)
// git-add (Add file contents to the index)
func ActionManPages() carapace.Action {
func ActionPages() carapace.Action {
return carapace.ActionCallback(func(c carapace.Context) carapace.Action {
return carapace.ActionExecCommand("man", "-k", c.Value)(func(output []byte) carapace.Action {
r := regexp.MustCompile(`^(?P<name>.*) \(\d+\) +- (?P<description>.*)$`)
Expand Down

0 comments on commit 213d371

Please sign in to comment.