def __insert_click_param(f, param):
    """
    Much like :func:`click.decorators._param_memo`, this updates
    the params on a command, but instead of append, it prepends
    the parameter
    :param function f:
    :param click.Parameter param:
    """
    if not hasattr(f, '__click_params__'):
        f.__click_params__ = []
    f.__click_params__.insert(0, param)
