Created
May 2, 2011 07:40
-
-
Save ohnishiakira/951272 to your computer and use it in GitHub Desktop.
.bashrcにこんな風に書いて、コマンドが成功したか失敗したかでプロンプトが変わるようにしてる
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
function check-shell-command { | |
if [ $? -eq 0 ]; then | |
echo "(^_^)" | |
else | |
echo "(+_+)" | |
fi | |
} | |
PS1='$(check-shell-command):\W \$' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment