From 97c98093940fdc4e5fccec8a6c6fee132e07809a Mon Sep 17 00:00:00 2001 From: Zach Welch Date: Wed, 25 Feb 2015 08:17:24 -0800 Subject: [PATCH] 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. --- chirpc | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/chirpc b/chirpc index b4525a76..6a25e507 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