def get_shell_cmd(pmconf, rm=False):
    """Form the shell command with the right package manager.
    It must be ready to append the packages list.

    - pmconf: tuple: name of pm, dict with conf (file, pacman, etc).

    Return: a cmd ready to run (str).
    """
    pacman = None
    un_install = 'install'
    if rm:
        un_install = 'uninstall'
    if not pmconf:
        print('Package manager not found. Abort.')
        return 0
    conf = pmconf[1]
    cmd = '{} {} {}'.format(conf.get('sudo', 'sudo'), conf.get('pacman',
        pmconf[0]), conf.get(un_install, un_install))
    return cmd
