mirror of
https://github.com/romkatv/powerlevel10k.git
synced 2024-12-21 06:41:57 +00:00
Add comments about the whitespace and coloring
This commit is contained in:
parent
5e0b924346
commit
9c4203bdf8
1 changed files with 6 additions and 2 deletions
|
@ -156,7 +156,9 @@ left_prompt_segment() {
|
||||||
if [[ -n $6 ]]; then
|
if [[ -n $6 ]]; then
|
||||||
visual_identifier="$(print_icon $6)"
|
visual_identifier="$(print_icon $6)"
|
||||||
if [[ -n "$visual_identifier" ]]; then
|
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 "
|
[[ -n "$5" ]] && visual_identifier="$visual_identifier "
|
||||||
# Allow users to overwrite the color for the visual identifier only.
|
# Allow users to overwrite the color for the visual identifier only.
|
||||||
local visual_identifier_color_variable=POWERLEVEL9K_${(U)1#prompt_}_VISUAL_IDENTIFIER_COLOR
|
local visual_identifier_color_variable=POWERLEVEL9K_${(U)1#prompt_}_VISUAL_IDENTIFIER_COLOR
|
||||||
|
@ -240,7 +242,9 @@ right_prompt_segment() {
|
||||||
if [[ -n "$6" ]]; then
|
if [[ -n "$6" ]]; then
|
||||||
visual_identifier="$(print_icon $6)"
|
visual_identifier="$(print_icon $6)"
|
||||||
if [[ -n "$visual_identifier" ]]; then
|
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"
|
[[ -n "$5" ]] && visual_identifier=" $visual_identifier"
|
||||||
# Allow users to overwrite the color for the visual identifier only.
|
# Allow users to overwrite the color for the visual identifier only.
|
||||||
local visual_identifier_color_variable=POWERLEVEL9K_${(U)1#prompt_}_VISUAL_IDENTIFIER_COLOR
|
local visual_identifier_color_variable=POWERLEVEL9K_${(U)1#prompt_}_VISUAL_IDENTIFIER_COLOR
|
||||||
|
|
Loading…
Reference in a new issue