Comments (8)
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.
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.
I have the same issue on linux with 1.18.1
, works fine on apple silicon on the same version
from starship.
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.
Same issue with starship 1.19.0
on macOS.
from starship.
@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.
nu-ansi-term
does not wrap the ANSI-sequences, but starship does.
from starship.
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)
- Setting a large command_timeout causes performance drop in Git repos HOT 1
- install.sh doesn't clean up after installing or updating
- Built-in ability to prioritize how to truncate the output when the terminal width gets too narrow HOT 1
- Git status displays despite a clean working tree HOT 1
- [FR] Support Jujutsu VCS (git backed) HOT 3
- set env var LD_LIBRARY_PATH or LD_PRELOAD will break starship
- Gradle support of `package` module should also support alternative notation
- Support Powershell PSReadLine vim mode character->vimcmd_symbol HOT 1
- `starhip prompt` stats all directories in PWD.
- [Git 2.45] Reftable storage backend is not supported
- Weird Spacing Issue
- No starship prompt in tcsh if 'direnv' gets initialized after starship HOT 1
- custom format hide part completely if empty
- more formatting option for cmd_duration
- AWS profile pattern based colorization
- Nerd Font Symbols preset screenshot is outdated
- Struggling to Use Context Patterns for Shortening EKS Cluster Names
- Allow Using a Custom Key When Determining Helm Package Version
- nix-shell packages
- Not executing in Nixos using home-manager HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from starship.