Set up the bash extension of powerline or powerline_shell (another task).

def powerline_for_bash_or_powerline_shell(bindings_dir):
    '''Set up the bash extension of powerline or powerline_shell (another task).
    '''
    question = '\nSet up powerline-shell instead of powerline bash extension?'
    if query_yes_no(question, default='yes'):
        from setup import powerline_shell
        powerline_shell()
        # disable powerline bash extension if it has been set up
        powerline_bash_enabler = 'if [ -f ~/.bashrc_powerline_bash ]; then ' \
                                 'source ~/.bashrc_powerline_bash; fi'
        comment_out_line(filename='~/.bashrc', line=powerline_bash_enabler)
    else:
        powerline_for_bash(bindings_dir)
        # disable powerline_shell if it has been set up
        powerline_shell_enabler = 'if [ -f ~/.bashrc_powerline_shell ]; then ' \
                                  'source ~/.bashrc_powerline_shell; fi'
        comment_out_line(filename='~/.bashrc', line=powerline_shell_enabler)