Skip to content

Instantly share code, notes, and snippets.

@ohnishiakira
Created May 2, 2011 07:40
Show Gist options
  • Save ohnishiakira/951272 to your computer and use it in GitHub Desktop.
Save ohnishiakira/951272 to your computer and use it in GitHub Desktop.
.bashrcにこんな風に書いて、コマンドが成功したか失敗したかでプロンプトが変わるようにしてる
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