-
Notifications
You must be signed in to change notification settings - Fork 4.5k
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
Autocomplete eat second line prompt #1488
Comments
Unfortunately, I still don't have enough information to reproduce this. I was only able to find one dotfiles repo among everyone who's commented so far and it appears to be pointing to oh-my-zsh. If someone could provide me their zpreztorc (and any other related zsh config files) I'd be happy to look into this further. |
I think my zpreztorc and zshrc are fairly typical. I have a lot of modules enabled, but nothing that I think would cause any issues. |
@leshow Thanks! Which terminal, OS, and version of zsh are you using? I'm hoping that will be enough for me to reproduce this. |
if there's anything else you need from me let me know. i will also try updating prezto and using pure on my home machine, it's running arch with up-to-date packages for everything. |
And as for my setup, here's my config files.
I'm running macOS High Sierra (v10.13) and using Terminal.app. |
I noticed this a few weeks ago when I did a recent upgrade to prezto and thought I might have been seeing things. I was still on El Capitan at the time, but upgraded to High Sierra last week. Today I noticed it ad-nauseum and watched things disappear as I used autocomplete. I didn't have a chance to look at it though and assumed it was my setup, but as others have noted it, it's apparently not a "my machine" issue. I'll take a look into this to see what I can discern in the am, but here's my info if it's even mildly helpful to anyone who may be checking it already (admittedly my update regimen is poor - still adjusting to having a baby in the house again): El Capitan - zsh version 5.0.3 - prezto commit - dd1133d Previous version that I believe worked: f236344 Also, I use the paradox theme, which may lend more credence to the multi-line prompt bit that was brought up by @leshow. |
This is curious... here's what I've tried to reproduce this: Using iTerm
All of these were tested with my personal config (with the prompt changed to pure) and the config from #1488 (comment) and I wasn't able to get this to reproduce with any of them. I'm at a loss since I haven't been able to reproduce this. I'm curious if anyone here runs into this on 5e295b0 since this is the last commit before the prompt_sp changes which were introduced because of an unofficially breaking change in zsh 5.4.1. I would be happy to help people debug this... easiest way to get a hold of me during the day would be to message me (I'm belak on Freenode) but if you don't use IRC, we might be able to work something else out. |
I said I'd report back and kind of forgot. I do not have this issue at home on my archlinux box, so I'm not sure what the culprit is. I do however have an ssh bug that I filed separately. The new init.zsh for ssh doesn't seem to agree with non-gui setups. Sorry to hijack. Edit: definitely nothing to do with 5e295b0 here, I hadn't updated in about 6 months and just updated this week. |
I just wiped my config and pulled a fresh copy of Prezto – still experiencing the same issue with the latest version. |
@leshow I mentioned that commit because it's the last one before before a prompt related change... So I thought the next commit could have been a culprit. I do understand you were on an older commit. If anyone has a known good commit and can do a bisect, that would also be helpful. |
Tried to reproduce on something other than Mac OS:
I was unable to reproduce this issue on there. I also tested this on Mac OS |
Spent some time on this today and boy am I ashamed. So for everyone who's in this A long long time ago in issue #1245 there was a story of how there was a regression Step 1:
Step 3: Or you can replace all of those hardcoded paths to So to sum the issue up: This is not a prezto problem, but a problem with zsh that's That being said: Do we want to make a note somewhere for Mac OS users to verify that |
Thanks for looking into it! I vaguely remember that issue, but it would have taken me a while to find it again. If it's possible to add a hack to work around this, I'd like to do that... however, recommending the latest version of zsh seems like a reasonable alternative. It may also be worth compiling a list somewhere with breaking changes in zsh (like the prompt crap in 5.4.1 and this) so we can find this stuff easier in the future. |
Do we know if macOS Sierra also shipped with 5.3? I know I had this issue before updating to High Sierra. I updated zsh using the above instructions and it seemed to fix the issue. Thanks @johnpneumann! |
Looks like 5.2 on Sierra.
|
@belak - We could definitely add a hack in here for this using the pre-prompt In re: compiling a list - We should definitely expand the documentation to @josiahwiebe - Glad it worked out. Definitely made my evening a bit better. :) Additional thoughts on the issue of zsh versions eg. rambling thoughts Does anyone know what the state of differing zsh versions are across the Ideally we'd do some type of pre-check that determines if the version of zsh It might be good to actually ask some of the theme developers what their |
One thing worth noting: the lowest version we officially support has traditionally come from the oldest version of Debian that's still supported. I think the current minimum comes from either RHEL or CentOS 6 (I can't remember which, but it was a recent PR). |
Interesting. I've made no changes since updating my zsh version and the issue has resurfaced. ¯_(ツ)_/¯ |
There was a fix mentioned by the wizards working on pure (sindresorhus/pure#376 (comment)) but I haven't been able to take the time and figure out why that fixes the issue. If anyone manages to port fixes for other themes in prezto, please feel free to submit pull requests. |
@belak Thanks for pointing to that issue. I actually gave that a go, but it did not fix the pure prompt at all. Will keep at it and post here if I get anywhere with it. |
I'm removing the upstream label for now since I believe we've had reports of other themes in prezto seeing the same issue. |
Silly me, even though I had the latest zsh version, it wasn't actually being used, my $SHELL var still pointed to the 5.3 version of it. Fixing that seems to have fixed the tab eating away one line of the prompt. The fix on pure didn't seem to be doing anything, however. |
Ok. So I just tested this on Sierra and it has been fixed. I'm not sure if it was fixed in #1547, but my assumption is that it was. I tested with the following options:
I hit tab 3 times, which is why it's on Downloads. If anyone can confirm this, I'd appreciate it and we can close this out. |
I can confirm that it is still present on Mojave (10.14) with zsh --version giving 5.3 |
Still present in |
@juanibiapina if its still a problem see @johnpneumann's solution. That works like a charm. |
Is this the solution to use |
What prompt are you using? What's the version of prezto? |
Sorry about the confusion, this is not related to prezto. It's still a zsh bug. |
What seems to be the problem with zsh? |
Description
Problem to show autocomplete when prompt is multi-lines
Expected behavior
Autocomplete word should show in second line
Actual behavior
Autocomplete word showed in first line
Steps to Reproduce
PROMPT=$'${SSH_TTY:+"%F{9}%n%f%F{7}@%f%F{3}%m%f "}%F{6}${_prompt_sorin_pwd}%(!. %B%F{1}#%f%b.)\n${editor_info[keymap]} '
ls
thentab
to activate autocompleteVersions
The text was updated successfully, but these errors were encountered: