assist/command/install.py
def source_assistrc():
    """Source the .assistrc file in the .bashrc file. """
    bash_map = {
        'Darwin': '.bash_profile',
        'darwin': '.bash_profile',
        'Linux': '.bashrc',
        'linux': '.bashrc',
    }
    platform = sys.platform
    try:
        bashrc_path = pth.expandvars('$HOME/%s' % bash_map[platform])
    except KeyError:
        disp('Error: %s platform not supported\n' % platform)
        exit(2)
    disp('checking %s ... ' % bashrc_path)
    if pth.exists(bashrc_path):
        expr = [
            'source ~/.assistrc\n',
            'source $HOME/.assistrc\n',
            pth.expandvars('source $HOME/.assistrc\n'),
        ]
        for content_line in open(bashrc_path, 'r'):
            for line in expr:
                if line == content_line:
                    disp('ok\n')
                    return
    with open(bashrc_path, 'a') as content_file:
        disp('\n    including .assistrc\n')
        content_file.write('source ~/.assistrc\n')
Source the .assistrc file in the .bashrc file. 
Source the .assistrc file in the .bashrc file.
Source the . assistrc file in the . bashrc file .
def source_assistrc():
    bash_map = {
        'Darwin': '.bash_profile',
        'darwin': '.bash_profile',
        'Linux': '.bashrc',
        'linux': '.bashrc',
    }
    platform = sys.platform
    try:
        bashrc_path = pth.expandvars('$HOME/%s' % bash_map[platform])
    except KeyError:
        disp('Error: %s platform not supported\n' % platform)
        exit(2)
    disp('checking %s ... ' % bashrc_path)
    if pth.exists(bashrc_path):
        expr = [
            'source ~/.assistrc\n',
            'source $HOME/.assistrc\n',
            pth.expandvars('source $HOME/.assistrc\n'),
        ]
        for content_line in open(bashrc_path, 'r'):
            for line in expr:
                if line == content_line:
                    disp('ok\n')
                    return
    with open(bashrc_path, 'a') as content_file:
        disp('\n    including .assistrc\n')
        content_file.write('source ~/.assistrc\n')
def source_assistrc ( ) : bash_map = { 'Darwin' : '.bash_profile' , 'darwin' : '.bash_profile' , 'Linux' : '.bashrc' , 'linux' : '.bashrc' , } platform = sys . platform try : bashrc_path = pth . expandvars ( '$HOME/%s' % bash_map [ platform ] ) except KeyError : disp ( 'Error: %s platform not supported\n' % platform ) exit ( 2 ) disp ( 'checking %s ... ' % bashrc_path ) if pth . exists ( bashrc_path ) : expr = [ 'source ~/.assistrc\n' , 'source $HOME/.assistrc\n' , pth . expandvars ( 'source $HOME/.assistrc\n' ) , ] for content_line in open ( bashrc_path , 'r' ) : for line in expr : if line == content_line : disp ( 'ok\n' ) return with open ( bashrc_path , 'a' ) as content_file : disp ( '\n    including .assistrc\n' ) content_file . write ( 'source ~/.assistrc\n' )
Source the .assistrc file in the .bashrc file.
Source the . assistrc file in the . bashrc file .
"""Source the .assistrc file in the .bashrc file. """