def parse_fields(fields):
    """Parse `fields` CLI argument.

    Args:
        fields (list): List of fields to display.

    Returns:
        list: Parsed fields.
    """
    # display all fields
    if fields == ['all']:
        return None

    # Remove unneeded fields
    to_remove = []
    if fields:
        # Go through fields and check for comma-delimited fields (user mistakes)
        for f in fields:
            if ',' in f:
                to_remove.append(f)
                more = f.split(",")
                fields.extend(more)
        for f in to_remove:
            fields.remove(f)
    return fields