Comments (4)
Obviously you're right. This is the strangest bug I've encountered in a long while, more to follow when I figure it out 😂I'll give you a sneak peak though, try out the Lean style, the status item works perfectly there. It seems to have something to do with the prompt_char item.
from tide.
An unexpected trigger. You'll have to add more config details to tide bug-report
in there are more config-specific bugs.
from tide.
I still don't really understand why my changes fixed this. I'll look more into it. Thanks for submitting this bug report 😄
from tide.
Okay, I get it now. Mostly putting this here for me in the future, but you too if you're interested.
I was only refreshing the prompt when the left_prompt_var
changed. This made perfect sense to me, as the right_prompt_var
is always changed before the left, thus we can do one refresh instead of two. The (in retrospect) obvious problem is that sometimes I change the right prompt without changing the left, causing the prompt not to update when it should. There were a number of factors concealing this problem however.
First is the fact that when the prompt is two lines, updating the "right prompt" status
is is actually updating the left_prompt_var
because of the way that multi-line right prompt works. So when the prompt is two lines, the bug won't appear.
Secondly, the prompt_char
item, which is always in the left prompt, and also responds to changes in the previous status by turning from green to red if the status was anything but 0. Thus, if the previous status was 0, and then we run a non-existent command, everything seems fine because the left prompt_char
changed to red and the right prompt status
changed to 127
. However, if our previous status wasn't 0, then the left prompt_char
would already be red. Then, when we run a non-existent command the prompt won't refresh because the --on-variable
handler only triggers when the variable is actually changed, and our left_prompt_var
stayed the same.
So basically the only way to see the bug easily was a single-line prompt that doesn't have the prompt_char
item, and I guess I just didn't spend enough time with those 😂
from tide.
Related Issues (20)
- Background jobs cause problem if the threshold is not set HOT 1
- Path is printed in console before rendering the prompt HOT 10
- PyCharm terminal broken by right prompt item HOT 4
- gh cli current auth user item
- Error when a directory name contains a pair of parentheses HOT 4
- Export configuration after tide configure HOT 3
- 🌊 Add support for Warp Terminal HOT 1
- Support for Bun HOT 3
- How do I patch my font to properly display special characters in this theme? HOT 1
- How to add git SHA in the end of git status info HOT 1
- You can now run `brew install font-meslo-for-powerlevel10k`
- Transient prompt doesn't work when input ^C to abort inputting
- Additional configure option for icons other than all on or all off.
- `pwd` in `$HOME` path doesn't seem to display correctly
- Weird behaviour when using fish with tide prompt in Intellij Idea HOT 5
- python virtualenv name is empty
- Message printed to iTerm2 after every input
- Prompts on the right contains insensible words HOT 1
- Tide identifies distrobox's linux flavor from host and not from container HOT 1
- 12/24 time format - wrong example
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 tide.