mirror of
https://github.com/cmderdev/cmder.git
synced 2025-02-25 23:00:23 +08:00
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:
parent
5305ebd4a6
commit
91aabe75af
6
vendor/clink.lua
vendored
6
vendor/clink.lua
vendored
@ -74,9 +74,9 @@ local cached_info = {}
|
|||||||
if clink.promptcoroutine and io.popenyield then
|
if clink.promptcoroutine and io.popenyield then
|
||||||
io_popenyield = io.popenyield
|
io_popenyield = io.popenyield
|
||||||
clink_promptcoroutine = clink.promptcoroutine
|
clink_promptcoroutine = clink.promptcoroutine
|
||||||
-- Uncommenting this will override the cmderGitStatusOptIn and always show
|
if prompt_overrideGitStatusOptIn then
|
||||||
-- git status when Clink is able to run it in the background.
|
cmderForceAsyncGitStatus = true
|
||||||
--cmderForceAsyncGitStatus = true
|
end
|
||||||
else
|
else
|
||||||
io_popenyield = io.popen
|
io_popenyield = io.popen
|
||||||
clink_promptcoroutine = function (func)
|
clink_promptcoroutine = function (func)
|
||||||
|
5
vendor/cmder_prompt_config.lua.default
vendored
5
vendor/cmder_prompt_config.lua.default
vendored
@ -29,6 +29,11 @@ prompt_useUserAtHost = false
|
|||||||
-- default is false
|
-- default is false
|
||||||
prompt_singleLine = false
|
prompt_singleLine = false
|
||||||
|
|
||||||
|
-- OPTIONAL. If true then always ignore the cmder.status and cmder.cmdstatus git config settings and run the git prompt commands in the background.
|
||||||
|
-- default is false
|
||||||
|
-- NOTE: This only takes effect if using Clink v1.2.10 or higher.
|
||||||
|
prompt_overrideGitStatusOptIn = false
|
||||||
|
|
||||||
-- Prompt Attributes
|
-- Prompt Attributes
|
||||||
--
|
--
|
||||||
-- Colors
|
-- Colors
|
||||||
|
Loading…
x
Reference in New Issue
Block a user