Git Product home page Git Product logo

Comments (8)

andytom avatar andytom commented on July 21, 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.

from starship.

chrispyles avatar chrispyles commented on July 21, 2024

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),

from starship.

MortezaRamezani avatar MortezaRamezani commented on July 21, 2024

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

from starship.

Goooyi avatar Goooyi commented on July 21, 2024

same problem for ubuntu bash

system

Distributor ID: Ubuntu
Description:    Ubuntu 18.04.6 LTS
Release:        18.04
Codename:       bionic

bash version

GNU bash, version 4.4.20(1)-release (x86_64-pc-linux-gnu)
Copyright (C) 2016 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>

starship verrsion

starship 1.19.0
branch:master
commit_hash:
build_time:2024-05-15 17:09:04 +00:00
build_env:rustc 1.78.0 (9b00956e5 2024-04-29),

from starship.

therealprof avatar therealprof commented on July 21, 2024

Same issue with starship 1.19.0 on macOS.

from starship.

gwirn avatar gwirn commented on July 21, 2024

@chrispyles @andytom I think the reason could be the use of nu-ansi-term which doesn't close the ansi escape sequences like described eg here or here. All colours end with <ESC>[0m and that seems cause issues with the determination of the remaining size of the terminal. You can test this if you temporarily set your PS1 to an orange right angle bracket like export PS1='\033[38;5;208m❱\033[0m' and you will get the same behaviour as described here because both, the start and the end of the color miss the \].

from starship.

davidkna avatar davidkna commented on July 21, 2024

nu-ansi-term does not wrap the ANSI-sequences, but starship does.

from starship.

krishna-bala avatar krishna-bala commented on July 21, 2024

If anyone wants to reproduce this, you can create a minimal ubuntu 22.04 docker container with starship prompt:

docker run -it ubuntu:22.04 /bin/bash -c "apt-get update && apt-get install -y curl && curl -sS https://starship.rs/install.sh | sh -s -- --yes && echo 'eval \"\$(starship init bash)\"' >> ~/.bashrc && /bin/bash"

Here's a video showing the wrapping issue:

starship_prompt.mp4

from starship.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.