Returns the compiled top data for pillar for a specific minion.  If no
    minion is specified, we use the first minion we find.

    CLI Example:

    .. code-block:: bash

        salt-run pillar.show_top

def show_top(minion=None, saltenv='base'):
    '''
    Returns the compiled top data for pillar for a specific minion.  If no
    minion is specified, we use the first minion we find.

    CLI Example:

    .. code-block:: bash

        salt-run pillar.show_top
    '''
    id_, grains, _ = salt.utils.minions.get_minion_data(minion, __opts__)
    if not grains and minion == __opts__['id']:
        grains = salt.loader.grains(__opts__)
    pillar = salt.pillar.Pillar(
        __opts__,
        grains,
        id_,
        saltenv)

    top, errors = pillar.get_top()

    if errors:
        __jid_event__.fire_event({'data': errors, 'outputter': 'nested'}, 'progress')
        return errors

    # needed because pillar compilation clobbers grains etc via lazyLoader
    # this resets the masterminion back to known state
    __salt__['salt.cmd']('sys.reload_modules')

    return top