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

cannot use any of the new color themes or prompts #682

Closed
chrisant996 opened this issue Oct 14, 2024 · 6 comments
Closed

cannot use any of the new color themes or prompts #682

chrisant996 opened this issue Oct 14, 2024 · 6 comments
Labels
bug Something isn't working

Comments

@chrisant996
Copy link
Owner

For some reason on my machine, although the update completed the second time successfully, I still cannot use any of the new color themes or prompts. I have stock settings so it can't be any lua script interfering.

Originally posted by @wbpayne22902 in #681 (comment)

@chrisant996
Copy link
Owner Author

@wbpayne22902 Thanks for reporting the problem.

I can reproduce the problem in a completely fresh Clink profile.
I'm not sure yet why it's happening.

@chrisant996 chrisant996 added bug Something isn't working and removed needs more information The issue needs clarifying information labels Oct 14, 2024
@wbpayne22902
Copy link

@chrisant996 Are there any logs that I can provide that might help you diagnose this issue? I'm happy to help with that.

@chrisant996
Copy link
Owner Author

@wbpayne22902 Thanks for offering. I'm not sure yet what could be helpful; and since I can reproduce the problem, I probably won't need additional diagnostic info.

So far I've found that in a fresh Clink profile the clink config prompt use Headline command is not actually setting the clink.customprompt setting.

If I manually run clink set clink.customprompt %=clink.bin%\themes\Headline.clinkprompt then the custom prompt works:

C:\Users\chrisant>clink set clink.customprompt %=clink.bin%\themes\Headline.clinkprompt
Setting 'clink.customprompt' set to 'c:\tmp\testclinkupdate\themes\Headline.clinkprompt'

________________________________________________________________________________________________________________________
chrisant @ CHRISANT16: C:\Users\chrisant
$

So that could be a temporary workaround to let you play with the custom prompts.

And when I first tried applying a color theme the colors started showing up after a few input prompts. I'll dig into the colors further after I figure out why clink config prompt use isn't writing the updated setting.

@chrisant996
Copy link
Owner Author

Oh. My. Mercy.

It's all because of a very long standing bug:

If the clink_settings file is missing, then there's nothing to load.

And so the Lua API settings::set() fails to load anything, and misinterprets that as "failure", and then skips actually updating the named setting.

This bug has existed since Sept 2021. 😖

@chrisant996
Copy link
Owner Author

chrisant996 commented Oct 14, 2024

@wbpayne22902 So, if you set any setting at all, then everything will magically start working.

E.g. run clink set clink.logo clear and then suddenly the clink config commands will work.

The clink set command doesn't use Lua APIs, but the clink config commands do (they have to).

@wbpayne22902
Copy link

Thanks so much for the fast workaround and fix. It's working great now and I'm loving the new prompts and color schemes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants