-vv is refused although the -v help text promises it #125

Closed
opened 2026-10-04 04:02:21 +02:00 by clawbot · 2 comments
Collaborator

Problem

The -v flag's help text in internal/cli/mfer.go says "Increase verbosity (-v for verbose, -vv for debug)", but mfer -vv and mfer <command> -vv are refused: nothing turns on urfave/cli's handling of combined short flags, so -vv is read as an unknown flag named vv. Two reviewers found this independently while reviewing #107; it predates that PR. -v -v does give debug output.

Definition of done

  • Either -vv works wherever -v does (urfave/cli's own option for combined short flags, not hand-rolled parsing), or the help text says -v -v and nothing promises -vv.
  • A test runs the documented form and checks it gives debug output.
  • make check passes.
  • Lands after #107, which changes the same flags.
  • Commit title ends with (closes #N) for this issue's number.

Model: opus-5-5

## Problem The `-v` flag's help text in `internal/cli/mfer.go` says "Increase verbosity (-v for verbose, -vv for debug)", but `mfer -vv` and `mfer <command> -vv` are refused: nothing turns on urfave/cli's handling of combined short flags, so `-vv` is read as an unknown flag named `vv`. Two reviewers found this independently while reviewing https://git.eeqj.de/sneak/mfer/pulls/107; it predates that PR. `-v -v` does give debug output. ## Definition of done - Either `-vv` works wherever `-v` does (urfave/cli's own option for combined short flags, not hand-rolled parsing), or the help text says `-v -v` and nothing promises `-vv`. - A test runs the documented form and checks it gives debug output. - `make check` passes. - Lands after https://git.eeqj.de/sneak/mfer/pulls/107, which changes the same flags. - Commit title ends with ` (closes #N)` for this issue's number. Model: opus-5-5
Author
Collaborator

Same flags, found by the reviewer of #107 (now on next), added to this issue's scope: urfave/cli v2 counts a count flag given by its alias twice, so a single -v already gives debug output instead of verbose; and -v --verbose together is refused with "Cannot use two forms of the same flag".

Added to the definition of done: -v gives verbose and two of them give debug, with a test for each; -v --verbose is accepted or the refusal is the documented behaviour.

Model: opus-5-5

Same flags, found by the reviewer of https://git.eeqj.de/sneak/mfer/pulls/107 (now on `next`), added to this issue's scope: urfave/cli v2 counts a count flag given by its alias twice, so a single `-v` already gives debug output instead of verbose; and `-v --verbose` together is refused with "Cannot use two forms of the same flag". Added to the definition of done: `-v` gives verbose and two of them give debug, with a test for each; `-v --verbose` is accepted or the refusal is the documented behaviour. Model: opus-5-5
Author
Collaborator

Built in #134: one -v now gives verbose output and two give debug, and -vv works wherever -v does (urfave/cli bumped to v2.27.7, with its option for combined short flags turned on). -v --verbose together stays refused, because urfave/cli v2 refuses any flag given under two of its names; the PR body records that.

Model: opus-5-5

Built in https://git.eeqj.de/sneak/mfer/pulls/134: one `-v` now gives verbose output and two give debug, and `-vv` works wherever `-v` does (urfave/cli bumped to v2.27.7, with its option for combined short flags turned on). `-v --verbose` together stays refused, because urfave/cli v2 refuses any flag given under two of its names; the PR body records that. Model: opus-5-5
Sign in to join this conversation.