aboutsummaryrefslogtreecommitdiff
path: root/config
diff options
context:
space:
mode:
authorromkatv <roman.perepelitsa@gmail.com>2019-08-30 09:38:56 +0300
committerromkatv <roman.perepelitsa@gmail.com>2019-08-30 09:38:56 +0300
commit9a5abe8185870df5e41e5506253fc9575d541dc9 (patch)
tree9f884fe89c30e9cef3f58df944c2ba62be408b66 /config
parent71c6843cb47fec88baec15bdbd633b47368a4f7e (diff)
add comments around git branch shortening
Diffstat (limited to 'config')
-rw-r--r--config/p10k-classic.zsh6
-rw-r--r--config/p10k-lean.zsh4
2 files changed, 7 insertions, 3 deletions
diff --git a/config/p10k-classic.zsh b/config/p10k-classic.zsh
index 325bcad3..2115be21 100644
--- a/config/p10k-classic.zsh
+++ b/config/p10k-classic.zsh
@@ -321,9 +321,11 @@ fi
local vcs=''
# If on a branch...
vcs+='${${VCS_STATUS_LOCAL_BRANCH:+%76F'${(g::)POWERLEVEL9K_VCS_BRANCH_ICON}
- # If branch name is at most 32 characters long, show it in full.
+ # If local branch name is at most 32 characters long, show it in full.
+ # This is the equivalent of POWERLEVEL9K_VCS_SHORTEN_MIN_LENGTH=32.
vcs+='${${${$(($#VCS_STATUS_LOCAL_BRANCH<=32)):#0}:+${VCS_STATUS_LOCAL_BRANCH//\%/%%}}'
- # If branch name is over 32 characters long, show the first 12 … the last 12.
+ # If local branch name is over 32 characters long, show the first 12 … the last 12. The same as
+ # POWERLEVEL9K_VCS_SHORTEN_LENGTH=12 with POWERLEVEL9K_VCS_SHORTEN_STRATEGY=truncate_middle.
vcs+=':-${VCS_STATUS_LOCAL_BRANCH[1,12]//\%/%%}%28F…%76F${VCS_STATUS_LOCAL_BRANCH[-12,-1]//\%/%%}}}'
# '@72f5c8a' if not on a branch.
vcs+=':-%248F@%76F${VCS_STATUS_COMMIT[1,8]}}'
diff --git a/config/p10k-lean.zsh b/config/p10k-lean.zsh
index 627bc5f4..b90baa81 100644
--- a/config/p10k-lean.zsh
+++ b/config/p10k-lean.zsh
@@ -305,8 +305,10 @@ fi
# If on a branch...
vcs+='${${VCS_STATUS_LOCAL_BRANCH:+%76F'${(g::)POWERLEVEL9K_VCS_BRANCH_ICON}
# If local branch name is at most 32 characters long, show it in full.
+ # This is the equivalent of POWERLEVEL9K_VCS_SHORTEN_MIN_LENGTH=32.
vcs+='${${${$(($#VCS_STATUS_LOCAL_BRANCH<=32)):#0}:+${VCS_STATUS_LOCAL_BRANCH//\%/%%}}'
- # If local branch name is over 32 characters long, show the first 12 … the last 12.
+ # If local branch name is over 32 characters long, show the first 12 … the last 12. The same as
+ # POWERLEVEL9K_VCS_SHORTEN_LENGTH=12 with POWERLEVEL9K_VCS_SHORTEN_STRATEGY=truncate_middle.
vcs+=':-${VCS_STATUS_LOCAL_BRANCH[1,12]//\%/%%}%28F…%76F${VCS_STATUS_LOCAL_BRANCH[-12,-1]//\%/%%}}}'
# '@72f5c8a' if not on a branch.
vcs+=':-%f@%76F${VCS_STATUS_COMMIT[1,8]}}'