1
在終端中更改目錄時,我在命令行上獲得了額外的輸出。輸出是:在終端中使用'cd'打印語法錯誤
Casey-MacBook-Pro:~ casey$ cd Envs
-bash: command substitution: line 9: syntax error near unexpected token `done'
-bash: command substitution: line 9: ` done'
Caseys-MacBook-Pro:Envs casey$
任何想法是什麼造成這種情況?它可能是我的bash配置文件中的東西嗎?這是我的bash輪廓看起來當我運行subl〜/ .bash_profile中,如:
# MacPorts Installer addition on 2013-03-02_at_20:37:40: adding an appropriate PATH variable for use with MacPorts.
export PATH=/opt/local/bin:/opt/local/sbin:$PATH
# Finished adapting your PATH environment variable for use with MacPorts.
# 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
[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm" # Load RVM into a shell session *as a function*
# Setting PATH for Python 3.4
# The orginal version is saved in .bash_profile.pysave
PATH="/Library/Frameworks/Python.framework/Versions/3.4/bin:${PATH}"
export PATH
export WORKON_HOME=$HOME/.virtualenvs
source /usr/local/bin/virtualenvwrapper.sh
source /usr/local/bin/activate.sh
# MacPorts Installer addition on 2015-09-24_at_12:31:24: adding an appropriate PATH variable for use with MacPorts.
export PATH="/opt/local/bin:/opt/local/sbin:$PATH"
# Finished adapting your PATH environment variable for use with MacPorts.
export STORMPATH_API_KEY_ID=""
export STORMPATH_API_KEY_SECRET=""
export SENDGRID_API_KEY=""
export SECRET_KEY=""
export FLASK_CONFIG=""
export DEV_DATABASE_URL=""
export TEST_DATABASE_URL=""
# 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
# Setting PATH for Python 3.5
# The orginal version is saved in .bash_profile.pysave
PATH="/Library/Frameworks/Python.framework/Versions/3.5/bin:${PATH}"
export PATH
'type cd'顯示什麼? – Siguza
它顯示了這一點:CD是一個函數 CD(){ autoenv_cd 「$ @」 } – Casey
是否其中一個文件'〜/ ENVS/.env'或'〜/ .env'存在嗎?如果是這樣,你可以將他們的內容添加到問題中嗎? – Siguza