我的bashrc文件中有导致bash:命令找不到的东西吗?

我的bashrc文件中有导致bash:命令找不到的东西吗?,bash,.bash-profile,Bash,.bash Profile,当我打开一个新外壳时,我得到: Last login: Sun Mar 23 10:14:46 on ttys000 -bash:  : command not found 我不完全确定如何弄清楚那里发生了什么,因为不完全清楚它在谈论哪个命令 它是否可能在.bashrc文件中 HISTSIZE=10000 HISTFILESIZE=20000 export CLICOLOR=1 export LSCOLORS=ExFxCxDxBxegedabagacad export PS1="\[\e[

当我打开一个新外壳时,我得到:

Last login: Sun Mar 23 10:14:46 on ttys000

-bash:  : command not found
我不完全确定如何弄清楚那里发生了什么,因为不完全清楚它在谈论哪个命令

它是否可能在.bashrc文件中

HISTSIZE=10000
HISTFILESIZE=20000

export CLICOLOR=1
export LSCOLORS=ExFxCxDxBxegedabagacad
export PS1="\[\e[01;32m\]\h \[\e[01;34m\]\W \$(parse_git_branch)\[\e[01;34m\]$\[\e[00m\] "

export PYTHONSTARTUP=/Users/JimShook/.pythonstartup
export WORKON_HOME=$HOME/.virtualenv
source /usr/local/bin/virtualenvwrapper.sh

# Setting PATH for Python 2.7
# The orginal version is saved in .bash_profile.pysave
PATH="/Library/Frameworks/Python.framework/Versions/2.7/bin:${PATH}"
export PATH

function parse_git_dirty {
    [[ $(git status 2> /dev/null | tail -n1) != "nothing to commit (working directory clean)" ]] && echo "*"
}

function parse_git_branch {
    git branch --no-color 2> /dev/null | sed -e '/^[^*]/d' -e "s/* \(.*\)/[\1$(parse_git_dirty)]/"
}

PATH=$PATH:/usr/local/rvm/bin # Add RVM to PATH for scripting

### Added by the Heroku Toolbelt
或者是bash_的简介

if [ -f ~/.bashrc ]; then
    source ~/.bashrc
fi


[[ -s "/usr/local/rvm/scripts/rvm" ]] && source "/usr/local/rvm/scripts/rvm" # Load RVM into a shell session *as a function*

任何想法都是有帮助的

需要检查的事项-如上所述:

最近有什么变化吗?如果是这样,从那里开始。。。添加了新行/命令/源文件? 在文件中查找“控制代码” 尝试:

cat -v ~/.bashrc ## look for '^M' or other special chars - remove if present

bash -n ~/.bashrc ## try the 'sourced files' separately
如果使用VI,请在打开文件后尝试以下操作:

:语法关闭关闭颜色-可能更容易看到“隐藏”代码 :设置列表控制代码可能可见
检查事项-如上所述:

最近有什么变化吗?如果是这样,从那里开始。。。添加了新行/命令/源文件? 在文件中查找“控制代码” 尝试:

cat -v ~/.bashrc ## look for '^M' or other special chars - remove if present

bash -n ~/.bashrc ## try the 'sourced files' separately
如果使用VI,请在打开文件后尝试以下操作:

:语法关闭关闭颜色-可能更容易看到“隐藏”代码 :设置列表控制代码可能可见
那些看起来不错。您还可以检查/发布来源为的virtualenvwrapper.sh。解决shell问题的一种方法是运行:bash-xv以获得详细的输出。可能值得一试。有可能您的.bashrc已获得DOS行结尾;空白行3看起来是由一个单一的回车组成的,这是没有找到的命令,BASH不把回车当作空白来对待。您还可以检查/发布来源为的virtualenvwrapper.sh。解决shell问题的一种方法是运行:bash-xv以获得详细的输出。可能值得一试。有可能您的.bashrc已获得DOS行结尾;空白行3看起来是由一个单一的回车组成的,这是没有找到的命令,BASH不把回车当作空白来处理。