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

bash prompt prevents long commands from wrapping onto a new line #5881

Open
chrispyles opened this issue Mar 24, 2024 · 3 comments
Open

bash prompt prevents long commands from wrapping onto a new line #5881

chrispyles opened this issue Mar 24, 2024 · 3 comments
Labels
🐛 bug Something isn't working as expected. needs info Needs more information from the issue creator.

Comments

@chrispyles
Copy link

Current Behavior

When a command is longer than the number of columns after the bash prompt, the command does not wrap, but goes back to the beginning of the current line and begins overwriting the line.

Expected Behavior

When a command is longer than the line can hold, it should wrap onto a new line.

Additional context/Screenshots

wrap

Possible Solution

Environment

  • Starship version: 1.11.0
  • bash version: GNU bash, version 5.2.15(1)-release (aarch64-apple-darwin22.1.0)
    Copyright (C) 2022 Free Software Foundation, Inc.
    License GPLv3+: GNU GPL version 3 or later http://gnu.org/licenses/gpl.html

This is free software; you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

  • Operating system: Mac OS 14.2.1
  • Terminal emulator: iTerm.app 3.4.23
  • Git Commit Hash:
  • Branch/Tag: master
  • Rust Version: rustc 1.64.0
  • Rust channel: release
  • Build Time: 2022-10-15 01:40:28 +00:00

Relevant Shell Configuration

eval "$(starship init bash)"

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 = false

format = "\\[$shell\\] $username @ $hostname $directory $git_branch$condaλ "

[directory]
truncation_length = 10000
truncate_to_repo = false
format = "[$path](#0c66cc)"

[hostname]
ssh_only = false
format = "[$hostname](#B80101 bold)"

[shell]
bash_indicator = "bash"
disabled = false
format = "$indicator"

[username]
show_always = true
style_user = "bold #B80101"
format = "[$user]($style)"

[conda]
# format = "via [$symbol $environment]($style) "

@chrispyles chrispyles added the 🐛 bug Something isn't working as expected. label Mar 24, 2024
@andytom
Copy link
Member

andytom commented Mar 27, 2024

You are running a very old version of starship can you try updating to a more recent version and see if it is still an issue.

@andytom andytom added the needs info Needs more information from the issue creator. label Mar 27, 2024
@chrispyles
Copy link
Author

Still an issue on starship 1.18.1 (this is the version I got from brew upgrade starship)

$ starship --version
starship 1.18.1
branch:
commit_hash:
build_time:2024-03-24 09:51:46 +00:00
build_env:rustc 1.76.0 (07dca489a 2024-02-04) (Homebrew),

@MortezaRamezani
Copy link

I have the same issue on linux with 1.18.1, works fine on apple silicon on the same version

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. needs info Needs more information from the issue creator.
Projects
None yet
Development

No branches or pull requests

3 participants