Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[feat]: Make fast-theme be silent by default and do nothing if theme already set #44

Open
dagadbm opened this issue Jan 13, 2023 · 1 comment

Comments

@dagadbm
Copy link

dagadbm commented Jan 13, 2023

If the feature request is for a plugin or theme, specify it here.

No response

If the feature solves a problem you have, specify it here.

No response

Describe the proposed feature.

I would like to use fast-theme to set the theme as part of a CLI script (that can be run several times) however, it is very noisy the output and there is no option to silence it.

Also if theme is already set nothing should be done on this script as well.

Describe alternatives you've considered

No response

Additional context

No response

Related Issues

No response

@9ary
Copy link

9ary commented Jan 22, 2023

This would also be useful for declarative theme configuration, as it would be practical to call fast-theme from zshrc.

Edit: this snippet does exactly what I want, but it depends on the plugin itself being loaded:

function () {
    local theme=$1
    local current_theme
    zstyle -g current_theme ':plugin:fast-syntax-highlighting' theme
    if [[ $current_theme != $theme ]]; then
        fast-theme $theme
    fi
} base16

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants