当我打开一个新的shell时,我得到了:
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_profile?
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*
任何想法都有帮助。
答案 0 :(得分:4)
要检查的事项 - 如上所述:
尝试:
cat -v ~/.bashrc ## look for '^M' or other special chars - remove if present
bash -n ~/.bashrc ## try the 'sourced files' separately
如果使用VI,打开文件后要尝试一些事情: