* Default is now previous single-verbosity level; it was too annoying to
  add the -v every time.
** -q/--quiet has been added to return to the previous default output
This commit is contained in:
brent saner
2025-11-08 23:33:21 -05:00
parent 860ad5842b
commit 4cbb17bf9e
11 changed files with 792 additions and 36 deletions

View File

@@ -25,7 +25,8 @@ type commonBase struct {
Plain bool `short:"p" long:"plain" description:"Show plain output instead of unicode (only used if -f/--format=pretty)."`
Separator string `short:"S" long:"separator" default:"\n" description:"Separator between addresses; only used for -f/--format=pretty with no verbosity."`
Fmt string `short:"f" long:"format" choice:"json" choice:"pretty" choice:"yml" choice:"xml" default:"pretty" description:"Output format. 'pretty' is not intended to be parseable, either by subnetter or by external tooling."`
Verbose []bool `short:"v" long:"verbose" description:"Show verbose information if -f/--format=pretty. May be specified multiple times to increase verbosity (up to 3 levels)."`
Verbose []bool `short:"v" long:"verbose" description:"Show verbose (even more) information if -f/--format=pretty. May be specified multiple times to increase verbosity (up to 2 levels)."`
Quiet bool `short:"q" long:"quiet" description:"The opposite of -v/--verbose (if -f/--format=pretty). Overrides any/all verbosity and instead produces a much more simple newline-separated output that may be easier for e.g. shell script to parse."`
AllowReserved bool `short:"R" long:"allow-reserved" description:"If specified, do not warn about reserved IP addresses/networks."`
reservedArgs
AllowHostNet bool `short:"H" long:"allow-host" description:"If specified, do not warn about host bits. Host bits are always removed for subnetting (as otherwise there would be errors); this is only used only for output."`