小编ste*_*lin的帖子

.bashrc 未在登录时运行

我一直在玩彩色提示,设置在.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)

bash bashrc

2
推荐指数
1
解决办法
9579
查看次数

标签 统计

bash ×1

bashrc ×1