1
0
mirror of synced 2024-11-22 17:24:32 +01:00

Added command to list included protocols.

This commit is contained in:
Jonathan Hamberg 2020-12-10 10:29:47 -08:00
parent 4e8326ea6c
commit 211fdc3bb4
No known key found for this signature in database
GPG Key ID: CC08C41588784EBF

View File

@ -483,6 +483,7 @@ class Main():
print(" -h, --help : Displays this help information")
print(" -n, --no-numbers : Do not print bit numbers on top of the header")
print(" -V, --version : Displays current version")
print(" -l, --list : List included protocols")
print(" --evenchar <char> : Character for the even positions of horizontal table borders")
print(" --oddchar <char> : Character for the odd positions of horizontal table borders")
print(" --startchar <char> : Character that starts horizontal table borders")
@ -624,6 +625,13 @@ class Main():
print("%s v%s" % (APPLICATION_NAME, APPLICATION_VERSION))
sys.exit(0)
# Display included protocols
elif argv[i]=="-l" or argv[i]=="--list":
for spec in specs.protocols.keys():
print(spec, "", end="")
print()
sys.exit(0)
# Incorrect option supplied
elif argv[i].startswith("-"):
print("ERROR: Invalid option supplied (%s)" % argv[i])