Closed tjex closed 1 year ago
Could not reproduce with a new installation of Zim replacing duration-info + git-info + asciiship by git-info + prompt-pwd + minimal.
Also could not reproduce with a new installation of Zim using your .zimrc, because TAB opens fzf and then SPACE does not select the completion. Even if doing TAB ENTER SPACE, I still cannot see the last character turn green.
Maybe this is related to one of the plugins you're using? Have you tried disabling one by one?
hmm damn. thanks for checking. I did try disabling what the main culprits should probably be (completion / syntax highlighting). But will have a more thorough go.
so I looked further and I've got new hints, but no answers... I uninstalled all plugins except the minimal theme (I'm only using zim and no external plugins).
It looks like the text is inheriting the color of the lambda symbol, which is being set dependent on whether a command was executed with/without fail.
The thing is that I was using the s1ck94 theme, which also took the color of a successful / failed command, and it did not color the text.
I'll keep looking, but it seems that it's not to do with any other zim / zsh plugin. This occurs in kitty and iterm.
maybe its a macos thing.
I guess this might be due to the colour for the prompt character never being reset via %f
:
https://github.com/zimfw/minimal/blob/08fcfda81af4d229f71270dc77dce28346311de5/minimal.zsh-theme#L54
The colour is set, the user character is printed, but colour is not reset. I haven't looked into it, but this suggests that colour in prompts is scoped - as in each %F
creates a colour scope and the caret character gets its own colour scope to be printed in grey, but once it uses %f
it exits its colour scope and we're back in the scope of the user character (green/red respectively in the above example).
Could you try replacing %{\E[0m%}
with %f
and see if that fixes the issue?
@PatTheMav is correct. Just fixed that. The %{\E[0m%}
is needed to clear the mode previously set by %{\E[${MNML_BGJOB_MODE}m%}
, but that was not clearing the foreground color set by %F{%(?.${MNML_OK_COLOR}.${MNML_ERR_COLOR})}
. Added the extra %f
.
Good catch @tjex!
Could you try replacing %{\E[0m%} with %f and see if that fixes the issue?
Yup! That did it :~) Thank you and very happy to have caught it @ericbn !
zimfw
.zimfw info
below.Describe the bug
When tab completing a path, and leaving the end of the path string with space, the last character becomes green. ie:
some/pa
some/path/
)'cd some/path <cursor>'
Steps to reproduce
The fist 4 steps restart the shell with a clean installation of Zim in a temporary directory. Use
exec zsh
when restarting the terminal or restarting the shell is needed.cd ${$(mktemp -d):A}
ZDOTDIR=${PWD} HOME=${PWD} ZIM_HOME=${PWD}/.zim exec zsh
curl -fsSL https://raw.githubusercontent.com/zimfw/install/master/install.zsh | zsh
exec zsh
zmodule minimal
to.zimrc
zimfw update
exec zsh
... I'm not sure why. Happy to try again if needed.Current behavior
When tab completing a path, and leaving the end of the path string with space, the last character becomes green. ie:
some/path
Expected behavior
The last character of the path string stays white, like the rest of the string.
Screenshots
Described behaviour and tab completion / space process with :
minimal theme
oblong theme
no theme
temp / minimal install
zimfw info
Additional context
This is my .zimrc