添加~/.bash_profile之后,bash失去高亮,~/.bashrc中的逻辑不运行。
添加前↑
添加后↑
在添加~/.bash_profile之后,~/.profile会被覆盖不再运行,而load bashrc的逻辑在~/.profile中,导致~/.bashrc也一并失效。
~/.profile中加载~/.bashrc的逻辑↑
- 方案一:将~/.bash_profile中的逻辑移至~/.profile,并删除~/.bash_profile。
- 方案二:在~/.bash_profile中添加以下代码保证~/.profile中的代码运行。
source ~/.profile
以上!まいど~



