Source File
man.go
Belonging Package
github.com/carapace-sh/carapace/internal/man
package manimport ()// Descriptions returns manpage descriptions for commands matching given prefix.func ( string) ( map[string]string) {= make(map[string]string)if strings.HasPrefix(, ".") || strings.HasPrefix(, "~") || strings.HasPrefix(, "/") {return}, := execabs.Command("man", "--names-only", "-k", "^"+).Output()if != nil {return}:= regexp.MustCompile(`^(?P<name>[^ ]+) [^-]+- (?P<description>.*)$`):= strings.Split(string(), "\n")for , := range {if := .FindStringSubmatch(); len() > 2 {[[1]] = [2]}}return}
![]() |
The pages are generated with Golds v0.8.2. (GOOS=linux GOARCH=amd64) Golds is a Go 101 project developed by Tapir Liu. PR and bug reports are welcome and can be submitted to the issue list. Please follow @zigo_101 (reachable from the left QR code) to get the latest news of Golds. |