To me this is more of an extension of help than an actual unique command line option. The reason being that it is now the only command (aside from help) which does not actually perform an action on a radio. If we are extending the list of radios why not apply it to set modes, duplex, etc...? Its starting to become rather confusing, imo. On the other hand the list of radios is rather long. Another option may be to print the list of radio at the end help output or to only print it out in verbose help mode, for example.
Most people are going to run --help, not see the list of radios, and they will need to figure out what command to run to see the list of radios, previously a one step process is now a two-step (with some thought).
-kosta
----------------------------------------
From: zach@mandolincreekfarm.com To: chirp_devel@intrepid.danplanet.com Date: Tue, 24 Feb 2015 23:26:48 -0800 Subject: [chirp_devel] [PATCH 4/9] chirpc: add --list-radios option (#2343)
# HG changeset patch # User Zach Welch zach@mandolincreekfarm.com
chirpc: add --list-radios option (#2343)
The current list of radios is too long to present to the user in the --help text, so this splits the list out into its own option.
diff --git a/chirpc b/chirpc index b4525a7..6a25e50 100755 --- a/chirpc +++ b/chirpc @@ -137,8 +137,9 @@ if __name__ == "__main__": help="Set mode (%s)" % ",".join(chirp_common.MODES)) parser.add_argument("-r", "--radio", dest="radio", default=None,
- help="Radio model (one of %s)" % ",".join(RADIOS.keys()))
- help="Radio model (see --list-radios)")
- parser.add_argument("--list-radios", action="store_true",
- help="List radio models")
parser.add_argument("--mmap", dest="mmap", default=None, help="Radio memory map file location") @@ -159,6 +160,10 @@ if __name__ == "__main__": options = parser.parse_args() args = options.args
- if options.list_radios:
- print "Supported Radios:\n\t", "\n\t".join(sorted(RADIOS.keys()))
- sys.exit(0)
if options.id: from chirp import icf
chirp_devel mailing list chirp_devel@intrepid.danplanet.com http://intrepid.danplanet.com/mailman/listinfo/chirp_devel Developer docs: http://chirp.danplanet.com/projects/chirp/wiki/Developers