Created
December 14, 2011 14:12
-
-
Save TAKAyukiatkwsk/1476711 to your computer and use it in GitHub Desktop.
現在の環境をプロンプトに表示させる
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# show exec environment | |
__show_env() { | |
if [ `pwd | grep "^/var/www/prod" | wc -l` -eq 1 ];then | |
echo "(prod)" | |
elif [ `pwd | grep "^/var/www/test" | wc -l` -eq 1 ];then | |
echo "(test)" | |
elif [ `pwd | grep "^/var/www/dev" | wc -l` -eq 1 ];then | |
echo "(dev)" | |
fi | |
} | |
PS1="[\u@\h \W]\[\033[1;33m\]\$(__show_env)\[\033[00m\]\$ " |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment