Fix -v flag collision between --verbose and --version #64
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Context
The global
--verboseflag declares a-valias, and--versionis wiredvia
mfa.app.VersionwithHideVersion = false(
internal/cli/entry.go:330,354), which gives urfave/cli its own-v.Running
mfer -v --versionfails hard:mfer --versionalone works and printsmfer version 0.1.0, so this is acollision between the two flags rather than a broken
--version. Shipping a1.0 CLI where a plausible flag combination produces an internal-sounding
parser error is not acceptable.
Definition of done
mfer -v,mfer --verbose,mfer --version,mfer -v --version, andmfer --verbose --versionall behave sensibly and none produce a parsererror.
owns
-vand why.mfer --versionandmfer versionproduce identical version output.and output.
make checkpasses.TODO.mdupdated in the same commit.Implementation requirements
-v. Both conventions exist in the wild(
-vfor verbose is more common in tools that also have-V/--version).Pick one, state the reasoning in the comment, and be consistent across
every subcommand — not just the global flag set.
--version. The releasechecklist requires a working SemVer
--version.-valias without saying so;if
-vstops meaning verbose, that is a user-visible change and belongsin the commit message.
you are in here, and cover any others found.
(closes #64).