unjs / citty

🌆 Elegant CLI Builder
Other
775 stars 26 forks source link

A way to override `--version` #145

Open igalklebanov opened 5 months ago

igalklebanov commented 5 months ago

Describe the feature

Hey 👋

❤️ citty!

I've implemented a custom version flag (aliased as v) and logic that prints versions of multiple packages. It seems that the built-in version flag logic overrides my flag logic and fails since I don't pass a version prop in the root command's meta object.

Doesn't seem like a bug, more like a behavior that needs enhancement - the ability to override the default behavior of --version.

WDYT?

Additional information

zuixinwang commented 3 months ago

Can you provide a reproduction please 😄

pi0 commented 3 months ago

(reproduction is not needed 👍🏼)