def modify_usage_error(subcommand, program_list):
    """
    Method to append the help menu to a modified usage error when a subcommand is specified, but options are missing
    :param subcommand: subcommand function
    :param program_list: list of acceptable sub-programs
    """
    import click
    from click._compat import get_text_stderr
    from click.utils import echo

    def show(self, file=None):
        import sys
        if file is None:
            file = get_text_stderr()
        color = None
        if self.ctx is not None:
            color = self.ctx.color
        echo('Error: %s\n' % self.format_message(), file=file, color=color)
        # Set the sys.argv to be the first two arguments passed to the script if the subcommand was specified
        arg2 = sys.argv[1] if sys.argv[1] in program_list else str()
        sys.argv = [' '.join([sys.argv[0], arg2])] if arg2 else [sys.argv[0]]
        # Call the help
        subcommand(['--help'])

    click.exceptions.UsageError.show = show
Method to append the help menu to a modified usage error when a subcommand is specified, but options are missing
    :param subcommand: subcommand function
    :param program_list: list of acceptable sub-programs