def METHOD_NAME(cmd, key, val):
    """
    Append options into command;
    """
    if re.match(r".*/%s.*", cmd, re.I):
        if val:
            rex = r"/%s\b+\S+\b+" % key
            val = "/%s %s " % (key, val)
            cmd = re.sub(rex, val, cmd, re.I)
    else:
        cmd += " /%s %s " % (key, val)
    return cmd