diff options
author | Benjamin Chausse <benjamin.chausse@goto.com> | 2025-03-26 17:21:12 -0400 |
---|---|---|
committer | Benjamin Chausse <benjamin.chausse@goto.com> | 2025-03-26 17:21:12 -0400 |
commit | 091c845c79b0aaf031e2fbbeaa91edb45d8d0272 (patch) | |
tree | 1f652e7951911f875ae2e218b29bd1a2a778d542 /internal/documentation/documentation.go | |
parent | ee994af6151654045e9a2543e360d2554fc4f851 (diff) |
De-bloat + goreleaser packages manpage
Diffstat (limited to 'internal/documentation/documentation.go')
-rw-r--r-- | internal/documentation/documentation.go | 16 |
1 files changed, 5 insertions, 11 deletions
diff --git a/internal/documentation/documentation.go b/internal/documentation/documentation.go index af4b302..c1db2c2 100644 --- a/internal/documentation/documentation.go +++ b/internal/documentation/documentation.go @@ -12,26 +12,20 @@ */ package main +//go:generate go run . > termpicker.1 + import ( _ "embed" "log/slog" "os" - "strings" "github.com/ChausseBenjamin/termpicker/internal/app" docs "github.com/urfave/cli-docs/v3" ) func main() { - a := app.Command() - - docs.MarkdownDocTemplate = strings.Join( - []string{ - docs.MarkdownDocTemplate, - app.KeybindingDocs, - }, - "\n", - ) + // version doesn't show up in the man page... + a := app.Command("") man, err := docs.ToManWithSection(a, 1) if err != nil { @@ -40,5 +34,5 @@ func main() { ) os.Exit(1) } - os.Stdout.Write([]byte(man)) + os.WriteFile("termpicker.1", []byte(man), 0644) } |