feat(remote): shorten "origin" as a pushpin
If the VCS remote name is "origin", then it will be shorten to DOTMATRIX_VCS_REMOTE_ORIGIN
This commit is contained in:
parent
be28a24b20
commit
74086c9fdd
2 changed files with 8 additions and 0 deletions
|
|
@ -212,6 +212,9 @@ Number of unpulled remote commits above which the prompt should use the warning
|
|||
|
||||
Number of modified lines above which the prompt should use the warning color to display the "commit" section.
|
||||
|
||||
**DOTMATRIX_VCS_REMOTE_ORIGIN** *string* = "🖈"
|
||||
|
||||
String used as a shorten VCS remote name, if it is "origin".
|
||||
|
||||
**DOTMATRIX_DETACHED_THRESHOLD** *integer = 3*
|
||||
|
||||
|
|
|
|||
|
|
@ -27,6 +27,8 @@ _lp_dotmatrix_theme_activate() {
|
|||
DOTMATRIX_SHELL_ZSH=${DOTMATRIX_SHELL_ZSH:-"z"}
|
||||
DOTMATRIX_SHELL_BASH=${DOTMATRIX_SHELL_BASH:-"b"}
|
||||
|
||||
DOTMATRIX_VCS_REMOTE_ORIGIN=${DOTMATRIX_VCS_REMOTE_ORIGIN:-"🖈"}
|
||||
|
||||
DOTMATRIX_ENABLE_HISTORY=${DOTMATRIX_ENABLE_HISTORY:-0}
|
||||
DOTMATRIX_HISTORY_LAST_LEN=${DOTMATRIX_HISTORY_LAST_LEN:-$((COLUMNS/4))}
|
||||
DOTMATRIX_HISTORY_LAST_LEN_MARK=${DOTMATRIX_HISTORY_LAST_LEN_MARK:-"[…]"}
|
||||
|
|
@ -880,6 +882,9 @@ __dotmatrix_prompt_vcs() {
|
|||
# Mark & commits off remote
|
||||
if _lp_vcs_commits_off_remote; then # There is remote-space-[local].
|
||||
_lp_vcs_remote # Get remote name.
|
||||
if [[ "$lp_vcs_remote" == "origin" ]]; then
|
||||
lp_vcs_remote="$DOTMATRIX_VCS_REMOTE_ORIGIN"
|
||||
fi
|
||||
|
||||
# Remote segment.
|
||||
if [[ "$lp_vcs_commit_behind" -ne "0" ]]; then # NOTE remote segment.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue