Commit 6b06b191 authored by Johannes Kiesel's avatar Johannes Kiesel

Changed cheatsheet layout

parent ab141d22
This diff is collapsed.
......@@ -106,16 +106,17 @@ def get_subcommand_help(subcommandpath):
def print_help_table(config):
"""Prints a table with all commands, subcommands, and their descriptions."""
print("| command | subcommand | description |")
print("| -------------------- | -------------------- | ---------------------------------------- |")
print("(sub-)command | description ")
print("------------------------------ | --------------------------------------------------")
commands = get_commands(config)
for command in commands:
command_help = str(config["commands_help"].get(command))
print("| {:20s} | {:20s} | {:40s} | ".format("*"+command+"*", "", "*"+command_help+"*"))
print("{:30s} | {}".format("**"+command+"**", "**"+command_help+"**"))
subcommands = get_subcommands(config, commands[command])
for subcommand in subcommands:
subcommand_help = str(get_subcommand_help(subcommands[subcommand]))
print("| {:20s} | {:20s} | {:40s} | ".format("", subcommand, subcommand_help))
print(" {:28s} | {}".format(subcommand, subcommand_help))
print("------------------------------ | --------------------------------------------------")
def check_subcommand_shebang(subcommandpath, allowed_scripts):
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment