Skip to content
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

zsh suggestion is hidden when enable shellIntegration #145296

Closed
tjx666 opened this issue Mar 17, 2022 · 17 comments · Fixed by #154300
Closed

zsh suggestion is hidden when enable shellIntegration #145296

tjx666 opened this issue Mar 17, 2022 · 17 comments · Fixed by #154300
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug insiders-released Patch has been released in VS Code Insiders terminal-shell-integration Shell integration, command decorations, etc. verified Verification succeeded
Milestone

Comments

@tjx666
Copy link
Contributor

tjx666 commented Mar 17, 2022

  • VS Code Version: 1.66.0-insider
  • OS Version: MacOS 12.3

In iterm2:

image

In VSCode terminal when enable shellIntegration:

image

If I disable shellIntegration, everything goes ok:

image

@meganrogge
Copy link
Contributor

related to #145254

@meganrogge meganrogge added bug Issue identified by VS Code Team member as probable bug terminal-shell-integration Shell integration, command decorations, etc. labels Mar 17, 2022
@meganrogge meganrogge added this to the March 2022 milestone Mar 17, 2022
@meganrogge meganrogge modified the milestones: March 2022, April 2022 Mar 21, 2022
@meganrogge
Copy link
Contributor

I believe this is already fixed, can you see if you can reproduce in the Insiders build?
/"needs-more-info"

@JacksonKearl
Copy link
Contributor

Not quite yet... this is why I personally have shell integration disabled btw.

Recording 2022-04-28 at 11 55 14

@JacksonKearl JacksonKearl added the verification-found Issue verification failed label Apr 28, 2022
@meganrogge meganrogge reopened this Apr 28, 2022
@meganrogge meganrogge removed the verification-found Issue verification failed label Apr 28, 2022
@meganrogge meganrogge modified the milestones: April 2022, May 2022 Apr 28, 2022
@meganrogge
Copy link
Contributor

meganrogge commented Apr 28, 2022

This is working for me
Screen Shot 2022-04-28 at 12 41 43 PM

Here's what I did
Screen Shot 2022-04-28 at 12 43 44 PM

from https://github.com/zsh-users/zsh-autosuggestions/blob/master/INSTALL.md

@meganrogge
Copy link
Contributor

meganrogge commented Apr 28, 2022

@JacksonKearl has reported it does not work if you just have plugins=(git zsh-autosuggestions) in your .zshrc

@JacksonKearl
Copy link
Contributor

Looks like suggestion text does show up, but it uses a different history file. So it will suggest entries you have made with shell integration enabled, but not those made in normal terminals.

@JacksonKearl JacksonKearl modified the milestones: May 2022, April 2022 Apr 28, 2022
@JacksonKearl JacksonKearl added the verified Verification succeeded label Apr 28, 2022
@meganrogge
Copy link
Contributor

@Tyriar should it be using the same history file?

@github-actions github-actions bot locked and limited conversation to collaborators Jun 12, 2022
@Tyriar
Copy link
Member

Tyriar commented Jun 30, 2022

@meganrogge is this fine now because we revert $ZDOTDIR to the original? We definitely want to share the zsh history file.

@Tyriar Tyriar reopened this Jun 30, 2022
@microsoft microsoft unlocked this conversation Jun 30, 2022
@Tyriar Tyriar removed this from the April 2022 milestone Jun 30, 2022
@Tyriar Tyriar added this to the July 2022 milestone Jun 30, 2022
@meganrogge
Copy link
Contributor

@Tyriar it's using the history from within VS Code only - when should it get refreshed and also suggest things from the broad shell history? tried reloading the window
Screen Shot 2022-06-30 at 11 37 34 AM

@meganrogge
Copy link
Contributor

also does not pull from history of terminals that did not have shell integration enabled

@Tyriar
Copy link
Member

Tyriar commented Jun 30, 2022

@meganrogge it depends when zsh flushes history to ~/.zsh_history, not sure if it's when the shell closes or a command is run.

@meganrogge
Copy link
Contributor

hmm history is correct for terminals without shell integration, but not in ones w shell integration - even when I reload the window and create a new one
Screen Shot 2022-06-30 at 12 37 19 PM

@Tyriar
Copy link
Member

Tyriar commented Jun 30, 2022

@meganrogge what's $HISTFILE set to?

@meganrogge
Copy link
Contributor

Screen Shot 2022-06-30 at 12 45 40 PM

@Tyriar
Copy link
Member

Tyriar commented Jun 30, 2022

I'm guessing we need to fix up $HISTFILE as well to point at <original ZDOTDIR or ~>/.zsh_history?

meganrogge added a commit that referenced this issue Jul 6, 2022
@Tyriar Tyriar removed the verified Verification succeeded label Jul 6, 2022
@VSCodeTriageBot VSCodeTriageBot added unreleased Patch has not yet been released in VS Code Insiders insiders-released Patch has been released in VS Code Insiders and removed unreleased Patch has not yet been released in VS Code Insiders labels Jul 7, 2022
@connor4312 connor4312 added the verified Verification succeeded label Jul 28, 2022
@fredrikaverpil
Copy link

fredrikaverpil commented Aug 21, 2022

@Tyriar @meganrogge would you think my McFly error is related to the above discussion? (Cc @cantino)

image

After a touch /var/folders/cp/njmrk_0j57q3t5c8666fqr0r0000gn/T/vscode-zsh/.zsh_history my prompt looks normal again:

image

I believe this usually happens when vscode is updated ...?

EDIT: I just found a pre-existing issue in the mcfly repo here.

@Tyriar
Copy link
Member

Tyriar commented Aug 22, 2022

@fredrikaverpil we expect this to be fixed in the upcoming version, see #157128

Sorry about the hassle, please let us know if it's not fixed in 1.71

@github-actions github-actions bot locked and limited conversation to collaborators Aug 26, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Issue identified by VS Code Team member as probable bug insiders-released Patch has been released in VS Code Insiders terminal-shell-integration Shell integration, command decorations, etc. verified Verification succeeded
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants