cannot use any of the new color themes or prompts
Closed this issue · 6 comments
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)
@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 Are there any logs that I can provide that might help you diagnose this issue? I'm happy to help with that.
@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.
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. 😖
@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).
Thanks so much for the fast workaround and fix. It's working great now and I'm loving the new prompts and color schemes.