Skip to content

Commit

Permalink
feat(host): configurable symbol
Browse files Browse the repository at this point in the history
  • Loading branch information
olets committed Apr 21, 2020
1 parent a2eeadf commit 0c2fd80
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions porcelain-prompt.zsh
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ PORCELAIN_PROMPT_DEFAULT_USER=${PORCELAIN_PROMPT_DEFAULT_USER:=}
PORCELAIN_PROMPT_DEFAULT_HOST=${PORCELAIN_PROMPT_DEFAULT_HOST:=}
PORCELAIN_PROMPT_CWD=${PORCELAIN_PROMPT_CWD:=%2~}

# Configurable symbols
PORCELAIN_PROMPT_SYMBOL_HOST=${PORCELAIN_PROMPT_SYMBOL_HOST:=@}

# Configurable colors
PORCELAIN_PROMPT_COLOR_ACTION=${PORCELAIN_PROMPT_COLOR_ACTION:=199}
PORCELAIN_PROMPT_COLOR_ACTIVE_STAGED=${PORCELAIN_PROMPT_COLOR_ACTIVE_STAGED:=2}
Expand Down Expand Up @@ -48,7 +51,6 @@ function gitstatus_prompt_update() {
local unstaged_count
local node_version=''


local symbol_modified='_M'
local symbol_modified_staged='M_'
local symbol_added='??'
Expand Down Expand Up @@ -181,7 +183,7 @@ fi

if (( _porcelain_prompt_not_default_user || _porcelain_prompt_not_default_host )); then
(( _porcelain_prompt_not_default_user )) && PROMPT+='%F{$PORCELAIN_PROMPT_COLOR_USER}%n$f'
(( _porcelain_prompt_not_default_host )) && PROMPT+='%F{$PORCELAIN_PROMPT_COLOR_HOST}@%m%f'
(( _porcelain_prompt_not_default_host )) && PROMPT+='%F{$PORCELAIN_PROMPT_COLOR_HOST}${PORCELAIN_PROMPT_SYMBOL_HOST}%m%f'
PROMPT+=' '
fi

Expand Down

0 comments on commit 0c2fd80

Please sign in to comment.