Skip symbolic-ref and rev-parse commands used by __git_ps1
Remove code duplication by using clean_logged_achievements
Use "function" or "()" but not both

http://mywiki.wooledge.org/BashPitfalls?highlight=%28function%29#function_foo.28.29