git function prompt-git-head-name() { local git_dir="$(git rev-parse --git-dir 2>/dev/null)" if [ -z "$git_dir" ]; then return 1 fi local head_name='' local additional_info='' if [ -d "$git_dir/rebase-apply" ]; then if [ -f "$git_dir/rebase-apply/rebasing" ]; then additional_info="REBASE" elif [ -f "$git_dir/rebase-apply/applying" ]; then additional_info="AM" else additional_info="AM/REBASE" fi he