Add prompt config variable for async git prompt.

Setting `prompt_overrideGitStatusOptIn = true` will override the
`cmder.status` and `cmder.cmdstatus` git config settings and run the git
prompt status commands in the background.  But it only takes effect when
using Clink v1.2.10, since that's required in order to run prompt update
commands in the background.
This commit is contained in:
Chris Antos
2021-06-10 18:49:39 -07:00
parent 5305ebd4a6
commit 91aabe75af
2 changed files with 8 additions and 3 deletions

6
vendor/clink.lua vendored
View File

@ -74,9 +74,9 @@ local cached_info = {}
if clink.promptcoroutine and io.popenyield then
io_popenyield = io.popenyield
clink_promptcoroutine = clink.promptcoroutine
-- Uncommenting this will override the cmderGitStatusOptIn and always show
-- git status when Clink is able to run it in the background.
--cmderForceAsyncGitStatus = true
if prompt_overrideGitStatusOptIn then
cmderForceAsyncGitStatus = true
end
else
io_popenyield = io.popen
clink_promptcoroutine = function (func)