将Psql路径添加到Bash

时间:2013-11-21 20:53:13

标签: python bash virtualenv

我目前在我的bash档案中有这个:

export WORKON_HOME="$HOME/.virtualenvs"
source /usr/local/share/python/virtualenvwrapper.sh
# Setting PATH for EPD_free-7.3-2
# The orginal version is saved in .bash_profile.pysave
PATH="/Library/Frameworks/Python.framework/Versions/Current/bin:${PATH}"
export PATH

我想补充一点:

PATH="/Applications/Postgres93.app/Contents/MacOS/bin:$PATH"

如何在那里添加?

2 个答案:

答案 0 :(得分:1)

export PATH部分之前添加:

export WORKON_HOME="$HOME/.virtualenvs"
source /usr/local/share/python/virtualenvwrapper.sh
# Setting PATH for EPD_free-7.3-2
# The orginal version is saved in .bash_profile.pysave
PATH="/Library/Frameworks/Python.framework/Versions/Current/bin:${PATH}"
PATH="/Applications/Postgres93.app/Contents/MacOS/bin:$PATH"
export PATH

PATH=..行的最后一部分,阅读:$PATH或等效:${PATH},确保您不会覆盖现有值。

答案 1 :(得分:0)

只需在export PATH

之前添加该行