Giter Club home page Giter Club logo

Comments (6)

tjex avatar tjex commented on May 27, 2024 1

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 !

from minimal.

ericbn avatar ericbn commented on May 27, 2024

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?

from minimal.

tjex avatar tjex commented on May 27, 2024

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.

from minimal.

tjex avatar tjex commented on May 27, 2024

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.

Screen Shot 2023-03-02 at 15 27 28

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.

from minimal.

PatTheMav avatar PatTheMav commented on May 27, 2024

I guess this might be due to the colour for the prompt character never being reset via %f:

PS1=$'${SSH_TTY:+"%m "}${VIRTUAL_ENV:+"${VIRTUAL_ENV:t} "}%(1j.%{\E[${MNML_BGJOB_MODE}m%}.)%F{%(?.${MNML_OK_COLOR}.${MNML_ERR_COLOR})}%(!.#.${MNML_USER_CHAR})%{\E[0m%} $(_prompt_mnml_keymap) '

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?

from minimal.

ericbn avatar ericbn commented on May 27, 2024

@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!

from minimal.

Related Issues (3)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.