Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extra space when using a multi-line prompt #6638

Open
kapad opened this issue Mar 19, 2025 · 0 comments
Open

Extra space when using a multi-line prompt #6638

kapad opened this issue Mar 19, 2025 · 0 comments
Labels
🐛 bug Something isn't working as expected.

Comments

@kapad
Copy link

kapad commented Mar 19, 2025

Current Behavior

An extra space is added to the end of the first prompt line as shown with the highlight in the screenshot

Expected Behavior

This extra space should not be added to the end of the first prompt line

Additional context/Screenshots

Image

Environment

  • Starship version: 1.22.1
  • zsh version: zsh 5.9 (arm-apple-darwin24.2.0)
  • Operating system: Mac OS 15.3.2
  • Terminal emulator: iTerm.app 3.5.11
  • Git Commit Hash:
  • Branch/Tag:
  • Rust Version: rustc 1.84.0 (9fc6b4312 2025-01-07) (Homebrew)
  • Rust channel: release
  • Build Time: 2025-01-11 17:04:57 +00:00

Relevant Shell Configuration

# starship prompt
eval "$(starship init zsh)"

# Vagrant
# >>>> Vagrant command completion (start)
fpath=(/opt/vagrant/embedded/gems/gems/vagrant-2.4.3/contrib/zsh $fpath)
compinit
# <<<<  Vagrant command completion (end)

Starship Configuration

# Get editor completions based on the config schema
"$schema" = 'https://starship.rs/config-schema.json'

# Inserts a blank line between shell prompts
add_newline = true

format = """\
[](fg:cyan)\
($username)\
($hostname)\
[](fg:cyan)\
$fill\
[](fg:cyan)\
$memory_usage\
[](fg:black bg:cyan)\
$battery\
[](fg:cyan)
[](fg:cyan)\
$directory\
([](fg:black bg:cyan)$git_branch)\
($git_status)\
[](fg:cyan)\
$fill\
[](fg:cyan)\
($cmd_duration[](fg:black bg:cyan))\
$status\
[](fg:black bg:cyan)\
$time\
[](fg:cyan)
$character\
"""

# nerdfont symbols
#
#
#
#

[username]
show_always = true
format = "[ $user@]($style)"
style_user = "italic fg:black bg:cyan"
# style_root = ""

[hostname]
ssh_only = false
format = "[$hostname ]($style)"
style = "italic fg:black bg:cyan"

[memory_usage]
threshold = 0
disabled = false
symbol = "󰍛" #nerdfont 󰍛 
format = "[ $symbol $ram ]($style)"
style = "fg:black bg:cyan"

[battery]
format = '[ $symbol$percentage ]($style)'

[[battery.display]]
threshold = 100
style = "fg:black bg:cyan"

[[battery.display]]
threshold = 45
style = "fg:blue bg:cyan"

[[battery.display]]
threshold = 20
style = "fg:red bg:cyan"

[line_break]
disabled = false

[directory]
format = "[ $path ]($style)([$read_only ]($read_only_style))"
style = "fg:black bg:cyan"
read_only_style = "fg:red bg:cyan"
truncation_length = 3
truncate_to_repo = true
truncation_symbol = ".../"
fish_style_pwd_dir_length = 1

[git_branch]
format = "[ $symbol $branch(:$remote_name/$remote_branch) ]($style)"
symbol = ""
style = "fg:#b3da82 bg:cyan"
always_show_remote = true

[git_status]
format = "[$all_status]($style)"
style = "fg:#b3da82 bg:cyan"

# [git_status]
# format = '[$all_status]($style)'
# style = "fg:#1C3A5E bg:#FCF392"

# [git_metrics]
# format = "([+$added]($added_style))[]($added_style)"
# added_style = "fg:#1C3A5E bg:#FCF392"
# deleted_style = "fg:bright-red bg:235"
# disabled = false

# [hg_branch]
# format = "[ $symbol$branch ]($style)"
# symbol = " "

[cmd_duration]
min_time = 0
show_milliseconds = true
format = "[  $duration ]($style)"
style = "fg:black bg:cyan"

[status]
disabled = false
symbol = "󰅙"
success_symbol = ""
format = "[ $symbol $status ]($style)"
style = "fg:black bg:cyan"
success_style = "fg:black bg:cyan"
failure_style = "fg:red bg:cyan"
pipestatus = true
pipestatus_format = "[ $pipestatus ]($style)"

[time]
disabled = false
time_format = "%T"
style = "fg:black bg:cyan"
format = '[ 󱑍 $time ]($style)'

[fill]
symbol = ""
style = "fg:cyan"

[character]
success_symbol = '[❯](bold green)'
error_symbol = '[ ✗](#E84D44) '



@kapad kapad added the 🐛 bug Something isn't working as expected. label Mar 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 bug Something isn't working as expected.
Projects
None yet
Development

No branches or pull requests

1 participant