Skip to content

Commit

Permalink
update am_git_left_right_master prompt
Browse files Browse the repository at this point in the history
  • Loading branch information
eendroroy committed Apr 16, 2024
1 parent 336a0f3 commit 4bb8210
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
6 changes: 5 additions & 1 deletion modules/git.zsh
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,11 @@ am_git_left_right_master(){
__left=$(echo "$__git_left_right" | awk '{print $1}' | tr -d ' \n')
__right=$(echo "$__git_left_right" | awk '{print $2}' | tr -d ' \n')

echo -ne "%F{$AM_LEFT_RIGHT_COLOR}${__left}${AM_LEFT_RIGHT_SEP}${__right}%f"
__left_right="${__left}${AM_LEFT_RIGHT_SEP}${__right}"

if [[ "$__left_right" != '0|0' ]]; then
echo -ne "%F{$AM_LEFT_RIGHT_COLOR}${__left}${AM_LEFT_RIGHT_SEP}${__right}%f"
fi
}

am_git_stash(){
Expand Down
2 changes: 1 addition & 1 deletion modules/prompt.zsh
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ version_prompt(){

am_vcs_prompt(){
if [[ $(am_is_git) == 1 ]]; then
am_vcs_prompt_val="$(am_git_rebasing) %F{$AM_VCS_COLOR}${AM_GIT_SYM} %f$(am_git_branch) ($(am_git_left_right_master)) $(am_git_commit_time) $(am_git_rev) $(am_git_stash) $(am_git_left_right) $(am_git_dirty)"
am_vcs_prompt_val="$(am_git_rebasing) %F{$AM_VCS_COLOR}${AM_GIT_SYM} %f$(am_git_branch) $(am_git_left_right_master) $(am_git_commit_time) $(am_git_rev) $(am_git_stash) $(am_git_left_right) $(am_git_dirty)"
elif [[ $(am_is_hg) == 1 ]]; then
am_vcs_prompt_val="%F{$AM_VCS_COLOR} ${AM_HG_SYM}:%f$(am_hg_branch) $(am_hg_rev)"
elif [[ $(am_is_svn) == 1 ]]; then
Expand Down

0 comments on commit 4bb8210

Please sign in to comment.