diff --git a/README.md b/README.md index a55fac9..c1390a9 100644 --- a/README.md +++ b/README.md @@ -749,3 +749,18 @@ pda run script ```
+ +### Version + +`pda!` uses calendar versioning: `YYYY.WW`. ASCII art can be permanently disabled with `display_ascii_art = false` in config. + +```bash +# Display the full version output. +pda version + +# Or just the release. +pda version --short +# pda! 2025.47 release +``` + + diff --git a/cmd/version.go b/cmd/version.go index 0a6baf9..710737a 100644 --- a/cmd/version.go +++ b/cmd/version.go @@ -36,7 +36,8 @@ var versionCmd = &cobra.Command{ Use: "version", Short: "Display pda! version", Run: func(cmd *cobra.Command, args []string) { - if config.DisplayAsciiArt { + short, _ := cmd.Flags().GetBool("short") + if !short && config.DisplayAsciiArt { fmt.Print(asciiArt + "\n ") } fmt.Printf("%s\n", version) @@ -44,5 +45,6 @@ var versionCmd = &cobra.Command{ } func init() { + versionCmd.Flags().Bool("short", false, "Print only the version string") rootCmd.AddCommand(versionCmd) }