Does not work with starship prompt
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:
- Configure inshellisense in your
.zshrcfile. - Install and configure the Starship prompt in the same
.zshrcfile. - Open a new terminal session.
- See that it does not work
Expected behavior Drop down auto suggestions
Environment
- OS: macOS Sonoma
- Output of
0.0.1-rc.15 - Nodejs Version:
v22.0.0 - Shell:
zsh - Shell Version:
5.9
Additional context Probably conflicts with the hooks used by the Starship prompt (e.g., precmd and preexec)
This also happens to me, but in this case, It's ble.sh,
Without ble.sh:
With ble.sh:
Do you think it is related to the right prompt? How about the behavior without the right prompt?
Oh yeah, It started working again after I disabled right prompt
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.
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
@superdinmc how did you get it to play nicely with blesh? blesh seems to override it's bindings and just do up/down command history even when the inshellisense popup is open.
@TuomasAutio, I can't replicate this currently with 0.0.1-rc.15 with zsh 5.8.1 (I am on ubuntu though). My .zshrc looks like this
# ---------------- inshellisense shell plugin ----------------
if [[ -z "${ISTERM}" && $- = *i* && $- != *c* ]]; then
if [[ -o login ]]; then
is -s zsh --login ; exit
else
is -s zsh ; exit
fi
fi
# ---------------- startship plugin ----------------
eval "$(starship init zsh)"
Can you send your .zshrc here along along with the logs at ~/.inshellisense/inshellisense.log after starting inshellisense and running 1 command with the -v flag?
Can you send your
.zshrchere along along with the logs at~/.inshellisense/inshellisense.logafter starting inshellisense and running 1 command with the-vflag?
Same for you @superdinmc, I'll try to reproduce with ble.sh after
It's been months since I tried to use inshellisense on blesh but I will follow-up with the .bashrc ASAP.
There's also starship configuration, I will also have it here.
It's been months since I tried to use inshellisense on blesh but I will follow-up with the .bashrc ASAP.
There's also starship configuration, I will also have it here.
Sorry for the long silence on the issues, I haven't been able to work on it for a while. The project should get more attention moving forward
GitHub wouldn't let me upload the files and I lost access to my main domain so I'm using Tixte subdomain temporarily(and cloudflare went down when I tried to set it up with the new domain...).
GitHub wouldn't let me upload the files and I lost access to my main domain so I'm using Tixte subdomain temporarily(and cloudflare went down when I tried to set it up with the new domain...).
You can just drop them into some code blocks like below, my network won't let me download the files.
# .bashrc
export PS1='>'
I think this should be fixed in the most recent changes that will be released in 0.0.1-rc.17. You'll need to run is doctor and make any of the changes it recommends, but that should fix any configuration issues. Will reopen if it continues to be an issue in the future
@cpendery Thank you for taking the time to fix the issue! Does the fix also cover the case with ble.sh reported by @superdinmc and @NireBryce (as well as the original case with Starship)?
@cpendery Thank you for taking the time to fix the issue! Does the fix also cover the case with
ble.shreported by @superdinmc and @NireBryce (as well as the original case with Starship)?
@akinomyoga it should fix it, but please feel free to give it a retry once I do the release. I wasn't able to consistently replicate the behavior so I'm hopeful but not confident that it's fixed
Thanks!
@akinomyoga it should fix it, but please feel free to give it a retry once I do the release. I wasn't able to consistently replicate the behavior so I'm hopeful but not confident that it's fixed
OK, then I'll ask the users @superdinmc and @NireBryce about whether the issue is fixed in their environments. I'm just the author of ble.sh and not an Inshellisense user who experienced the issue. I received Issue https://github.com/akinomyoga/ble.sh/issues/464 in my project from @NireBryce so wanted to know the status.