Closed vaskark closed 2 years ago
Can you clarify which one is the expected and which one is the observed? Your prose and examples disagree on that.
What's $ZSH_VERSION and $ZSH_PATCHLEVEL?
Does this happen if you run ssh -t VM zsh -f
and in the resulting shell run source /path/to/zsh-syntax-highlighting.zsh
?
If the observed result is nvim.zshrc
, how is it highlighted?
Sorry for the confusion. I knew I didn't describe that right.
Expected:
nvim(space).zshrc
Observed:
(space)nvim.zshrc
Version: 5.8 Patch Level: zsh-5.8-0-g77d203f
Running ssh -t VM zsh -f
and sourcing the plugin does NOT reproduce the error I'm experiencing.
In the observed result above, the program name, nvim, is highlighted as expected. If I mispell it and add a space after as usual, the spacing problem goes away.
Hopefully this provides better info for your analysis.
Edit: It seems to be primarily happening for programs mentioned in my aliases list. But not 100%. Edit: zsh 5.8.1 just came through as an update. Same problem occurring.
Patch Level: zsh-5.8-0-g77d203f
You might want to update to 5.8.1 for CVE-2021-45444 [github auto-linked the CVE identifier].
In the observed result above, the program name, nvim, is highlighted as expected.
What's "as expected"? Green? Red? White underlined?
Running
ssh -t VM zsh -f
and sourcing the plugin does NOT reproduce the error I'm experiencing.In the observed result above, the program name, nvim, is highlighted as expected. If I mispell it and add a space after as usual, the spacing problem goes away.
Then the culprit is somewhere in your dotfiles. Probably the prompt setting (grep for PROMPT or PS1). In any case, there's little we can do if the problem doesn't reproduce in the minimal setup (zsh -f
+ this plugin only).
An update to 5.8.1 came through today. Same problem. 'As expected' had green highlighting. I'm using the pure prompt and deactivating it made the problem go away.
Thanks for your efforts in this matter.
You're welcome. They should probably use the %{…%}
and/or %G
prompt expandos in their PS1 setting.
I have this plugin activated on one of my virtual machines I remotely connect to. There's a bug where once I log in and start typing at the CLI there's a staggering of letters as if a space is being inserted where I didn't use one. This type of thing keeps happening but once I deactivate the plugin it stops. I'm probably not explaining this correctly, but it's just something I've noticed. I am using the latest git.
Thanks.
Edit:
Expected:
$ nvim .zshrc
Observed:
$ nvim.zshrc