how to get rid of this blank space #5388
-
Hi! I modified the Thanks! format = """
$directory\
[](fg:#769ff0 bg:#394260)\
$git_branch\
$git_status\
[](fg:#394260 bg:#1d2230)\
$time\
[ ](fg:#1d2230)\
$cmd_duration\
\n$character"""
add_newline = false
[character]
success_symbol = "[❯](fg:#769ff0)"
error_symbol = "[❯](purple)"
[directory]
style = "fg:#e3e5e5 bg:#769ff0"
format = "[$path]($style)"
truncation_length = 0
truncation_symbol = "…/"
truncate_to_repo = false
repo_root_style = "fg:#000000 bg:#769ff0"
[git_branch]
symbol = ""
style = "bg:#394260"
format = '[[ $symbol $branch ](fg:#769ff0 bg:#394260)]($style)'
[git_status]
style = "bg:#394260"
format = '[[($all_status$ahead_behind )](fg:#769ff0 bg:#394260)]($style)'
[time]
disabled = false
time_format = "%R" # Hour:Minute Format
style = "bg:#1d2230"
format = '[[ $time ](fg:#a0a9cb bg:#1d2230)]($style)' |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
If you include format = """\
$directory\
[](fg:#769ff0 bg:#394260)\
$git_branch\
$git_status\
[](fg:#394260 bg:#1d2230)\
$time\
[ ](fg:#1d2230)\
$cmd_duration\
$line_break\
$character
"""
add_newline = false
[character]
success_symbol = "[❯](fg:#769ff0)"
error_symbol = "[❯](purple)"
[directory]
style = "fg:#e3e5e5 bg:#769ff0"
format = "[$path]($style)"
truncation_length = 0
truncation_symbol = "…/"
truncate_to_repo = false
repo_root_style = "fg:#000000 bg:#769ff0"
repo_root_format = "[$before_root_path]($before_repo_root_style)[$repo_root]($repo_root_style)[$path]($style)[$read_only]($read_only_style)"
[git_branch]
symbol = ""
style = "bg:#394260"
format = '[[ $symbol $branch ](fg:#769ff0 bg:#394260)]($style)'
[git_status]
style = "bg:#394260"
format = '[[($all_status$ahead_behind )](fg:#769ff0 bg:#394260)]($style)'
[time]
disabled = false
time_format = "%R" # Hour:Minute Format
style = "bg:#1d2230"
format = '[[ $time ](fg:#a0a9cb bg:#1d2230)]($style)' |
Beta Was this translation helpful? Give feedback.
If you include
repo_root_style
in your[directory]
module,repo_root_format
is used—which contains a space at the end, in the default configuration (see: Documentation -> Directory. The below configuration should work as intended. I also fixed a couple of issues with theformat
string (exchanged the\n
before$character
with the$line_break
module and added a\
at the start of the format string, for better readability).