Skip to content

Commit

Permalink
feat(ref): add branch and commit symbols
Browse files Browse the repository at this point in the history
  • Loading branch information
olets committed Apr 21, 2020
1 parent d7f8ef5 commit 345e9a1
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions porcelain-prompt.zsh
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,8 @@ function gitstatus_prompt_update() {
local symbol_assume_unchanged=''
local symbol_skip_worktree=''
local dirty=0
local symbol_branch='#'
local symbol_commit=''

p+="$color_inactive"
(( VCS_STATUS_STASHES )) && p+="$color_stash$VCS_STATUS_STASHES"
Expand Down Expand Up @@ -101,11 +103,10 @@ function gitstatus_prompt_update() {
fi

if [[ -n $VCS_STATUS_LOCAL_BRANCH ]]; then
ref="$VCS_STATUS_LOCAL_BRANCH"
ref="$symbol_branch$VCS_STATUS_LOCAL_BRANCH"
else
ref=${VCS_STATUS_COMMIT[1,8]}
ref=$symbol_commit${VCS_STATUS_COMMIT[1,8]}
fi
# w+='#'
w+="$ref "

if [[ -n $VCS_STATUS_TAG ]]; then
Expand Down

0 comments on commit 345e9a1

Please sign in to comment.