Repository navigation
Add --version option - #40
Conversation
|
Hi, I don't see any issue in merging that, but i kindly ask you to also add the Just curios what other project is this needed for? |
|
Sure, added As for the use case: I have a personal system maintenance/update tool called I also use SupMover as part of my personal project FIXE, a CLI/TUI workflow for normalising Matroska metadata and track layout and for processing PGS subtitles (crop/move/tonemapping). Fixe integrates SupMover for the PGS operations, so having a clean version command also makes that integration easier to manage. Thanks! |
|
Thanks, merged and published a new version |
Summary
Add a dedicated
--versioncommand that prints the current SupMover version and exits successfully.Currently, invoking SupMover with a single argument falls through to the usage path, so tools that need to detect the installed version have to parse the first line of the full help text while the process exits with
255.This change:
SupMover --version, which prints onlySupMover v2.5.1and exits with code0;SUPMOVER_VERSIONonce and reuses it in both--versionoutput and the usage header;-vunassigned, so it remains available for a possible future--verboseshorthand as previously discussed in Dash prefix for options & Prettier usage #17.Validation
makesucceeds;./supmover --versionprints exactlySupMover v2.5.1and exits0;The compiler warnings shown by the current build are pre-existing and unrelated to this change.