diff options
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) } |