bash - .bashrc not reload from script -
iam newbee in bash scripts . trying add line on .bashrc file :
## make python 2.7 default in ~/.bashrc echo 'export path=/usr/local/lib/python/bin:$path' >> ~/.bashrc source ~/.bashrc the source command not reloading ~/.bashrc file . (but works if on prompt )
how can reload .bashrc script ? more appreciated .
cheers
aha! modern *nix systems usually have system-wide bashrc starts thus:
# system-wide .bashrc file interactive bash(1) shells. # enable settings / commands in file login shells well, # file has sourced in /etc/profile. # if not running interactively, don't [ -z "$ps1" ] && return ... stuff follows if observe last couple of lines issue become obvious. not running interactively. before sourcing bashrc in script, set ps1 arbitrary value, say:
ps1='foobar' and chances bashrc start loading script!
Comments
Post a Comment