Comments (7)
I have tried to solve out this issue by modifying out ANSIString and wrap non-printing character escape for all of ansi-term addition parts in my fork branch-link. I have checked this for bash shell and it seems to work properly for bash not yet tried for zsh. I think there is no issue for fish non printing character count if I am right. If solution is good to go and works for all shell I will create out PR #183
from starship.
Great find, @chipbuster! 😄
Sorry about all the bug reports I've been generating recently!
Don't be! We need hawk-eyed people around to help catch these bugs. I use starship as my daily-driver, but only on Fish. My visibility over these issues is limited. 😅
I'd be curious to find out if this issue occurs on other dynamic colored prompts. I'll be experimenting to see if maybe this is an underlying issue in zsh rather than something to do with the prompt itself. In https://github.com/matchai/spacefish we have had similar issues that were eventually solved with newly added configuration in fish.
the color codes are coming from the ANSI library, and I don't see a way to tell the library to wrap the escape codes in a shell-specific escape sequence.
ansi_term
is a pretty light library. If need be, we could create a PR or fork it to add the functionality needed for starship to work correctly.
from starship.
I'd be curious to find out if this issue occurs on other dynamic colored prompts.
By that do you mean any prompt that's dynamically generated or specifically one generated outside the shell?
While searching around, I definitely stumbled over some bugs involving this in the early years of oh-my-zsh and zprezto, but they were almost always solved by proper application of %{
and %}
to the prompt generation functions.
from starship.
Seems like this ansi-term
issue is due to the same underlying issue (only in bash): ogham/rust-ansi-term#36
from starship.
@iamsauravsharma your solution seems to work fine with zsh, thanks.
from starship.
I'm still experiencing this issue on 0.13.1 with oh-my-zsh:
https://asciinema.org/a/5J7BtDkoMnMDZb7fzNbcZp9Nx
(If I should open a new issue for this, please let me know.)
from starship.
@mozbhearsum Go ahead and open an issue (mostly because it's going to get lost if it stays here--I almost forgot to respond to this).
Does tab-completion appear to work correctly for you or is that broken as well? And is this taking place within a dockerized environment?
from starship.
Related Issues (20)
- [ FR ] Disable Git status tracking per directory HOT 1
- Draw right prompt before `line_break` HOT 1
- `fill` adds one too many spaces on Windows Terminal when used with `cmd_duration` HOT 1
- `bold fg:none` isn't bold HOT 1
- Feature/Refacto: Conflate all VCSes under an umbrella `vcs` module
- [Bash] PROMPT_COMMAND overriden or causes errors HOT 1
- Always showing `error_symbol` regardless of exit status of last operation HOT 1
- Irrelevant single character change in pyvenv.cfg changes the prompt displayed with the variable ($virtualenv) for Python
- nspawn wrongly detected as OCI HOT 5
- Update `git_metrics` example to work properly in clean repo
- Color on macOS is not correct HOT 1
- Conda section not using assigned color HOT 1
- The starship won't work if not commenting or deleting #Use manjaro zsh prompt portion in the .zshrc file. HOT 2
- Starship stopped to worked in WSL mode after connecting with VSCode HOT 1
- Installing starship on a QNAP NAS not working HOT 1
- Separators between command output
- Add uv flag to python module
- `git_state` showing symbols outside of git repo HOT 1
- Wrong offset for Unicode characters on tab completion HOT 2
- `[character]` is always `success_symbol` HOT 1
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.