mirror of
1
0
Fork 0
This commit is contained in:
Jonathan Hamberg 2020-12-10 10:56:06 -08:00 committed by GitHub
commit e199ca89a2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 0 deletions

View File

@ -270,6 +270,7 @@
-h, --help : Displays this help information
-n, --no-numbers : Do not print bit numbers on top of the header
-V, --version : Displays current version
-l, --list : List included protocols
--evenchar <char> : Character for the even positions of horizontal lines
--oddchar <char> : Character for the odd positions of horizontal lines
--startchar <char> : Character that starts horizontal lines

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])