我一直在玩彩色提示,设置在.bashrc.
问题是我总是需要.bashrc 在登录后获取源。当我登录时,我可以看到文件已获取(我尝试echo "SOURCED"在文件顶部添加一个。
然而,当我登录时,彩色提示的命令永远不会运行,尽管重新采购.bashrc工作 - 颜色设置在 之后source ~/.bashrc,我很好奇这种行为的性质。
# ~/.bashrc: executed by bash(1) for non-login shells.
# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc)
# for examples
# If not running interactively, don't do anything
case $- in
*i*) ;;
*) return;;
esac
# don't put duplicate lines or lines starting with space in the history.
# See bash(1) for more options
HISTCONTROL=ignoreboth
# append to the history …Run Code Online (Sandbox Code Playgroud)