microsoft / inshellisense

IDE style command line auto complete
MIT License
8.21k stars 179 forks source link

Does not work with starship prompt #262

Open TuomasAutio opened 4 weeks ago

TuomasAutio commented 4 weeks ago

Describe the bug When using the inshellisense plugin in conjunction with the Starship prompt in a Zsh shell, the inshellisense plugin fails to work as expected. Specifically, it does not give suggestions when starship is active

To Reproduce Steps to reproduce the behavior:

  1. Configure inshellisense in your .zshrc file.
  2. Install and configure the Starship prompt in the same .zshrc file.
  3. Open a new terminal session.
  4. See that it does not work

Expected behavior Drop down auto suggestions

Environment

Additional context Probably conflicts with the hooks used by the Starship prompt (e.g., precmd and preexec)

superdinmc commented 3 weeks ago

This also happens to me, but in this case, It's ble.sh, Without ble.sh: image With ble.sh: image

akinomyoga commented 3 weeks ago

Do you think it is related to the right prompt? How about the behavior without the right prompt?

superdinmc commented 3 weeks ago

image Oh yeah, It started working again after I disabled right prompt

akinomyoga commented 3 weeks ago

Then, I think inshellisense is confused by the existence of the right prompt. I searched in the repository for "right prompt", but nothing seems to be mentioned, so I think inshellisense doesn't just support shell settings with right prompts for now.

cpendery commented 3 weeks ago

I added this original to handle right prompts, which I'd expect to get triggered here. I think there are outstanding issues with zsh that might be contributing this as well (outside of the right prompt issue the bash users are experiencing) https://github.com/microsoft/inshellisense/blob/1a309c8104ee92d5fff2e16f689db0372796a788/src/isterm/commandManager.ts#L242