aboutsummaryrefslogtreecommitdiff
path: root/powerlevel9k.zsh-theme
diff options
context:
space:
mode:
authorYang Tang <tangyang.cn@gmail.com>2018-06-01 21:18:18 +0300
committerYang Tang <tangyang.cn@gmail.com>2018-06-01 21:18:18 +0300
commit9c4203bdf80440b43b5f559b5d8856f6b817ad9e (patch)
treeb95851e5b302690c9d7e20ccd48cdf22ed7dfb9d /powerlevel9k.zsh-theme
parent5e0b92434660ed73894b41a8a586c22c30830552 (diff)
Add comments about the whitespace and coloring
Diffstat (limited to 'powerlevel9k.zsh-theme')
-rwxr-xr-xpowerlevel9k.zsh-theme8
1 files changed, 6 insertions, 2 deletions
diff --git a/powerlevel9k.zsh-theme b/powerlevel9k.zsh-theme
index 836d4ae0..b8d4b0cc 100755
--- a/powerlevel9k.zsh-theme
+++ b/powerlevel9k.zsh-theme
@@ -156,7 +156,9 @@ left_prompt_segment() {
if [[ -n $6 ]]; then
visual_identifier="$(print_icon $6)"
if [[ -n "$visual_identifier" ]]; then
- # Add an whitespace if we print more than just the visual identifier
+ # Add an whitespace if we print more than just the visual identifier.
+ # To avoid cutting off the visual identifier in some terminal emulators (e.g., Konsole, st),
+ # we need to color both the visual identifier and the whitespace.
[[ -n "$5" ]] && visual_identifier="$visual_identifier "
# Allow users to overwrite the color for the visual identifier only.
local visual_identifier_color_variable=POWERLEVEL9K_${(U)1#prompt_}_VISUAL_IDENTIFIER_COLOR
@@ -240,7 +242,9 @@ right_prompt_segment() {
if [[ -n "$6" ]]; then
visual_identifier="$(print_icon $6)"
if [[ -n "$visual_identifier" ]]; then
- # Add an whitespace if we print more than just the visual identifier
+ # Add an whitespace if we print more than just the visual identifier.
+ # To avoid cutting off the visual identifier in some terminal emulators (e.g., Konsole, st),
+ # we need to color both the visual identifier and the whitespace.
[[ -n "$5" ]] && visual_identifier=" $visual_identifier"
# Allow users to overwrite the color for the visual identifier only.
local visual_identifier_color_variable=POWERLEVEL9K_${(U)1#prompt_}_VISUAL_IDENTIFIER_COLOR