Fix lamda color after a ConEmu change

Seems like https://github.com/Maximus5/ConEmu/issues/1288 caused this
This commit is contained in:
Benjamin Staneck 2017-10-29 10:46:38 +01:00
parent b6042a7ca1
commit a8d32611a9

8
vendor/clink.lua vendored
View File

@ -5,7 +5,7 @@
-- At first, load the original clink.lua file
-- this is needed as we set the script path to this dir and therefore the original
-- this is needed as we set the script path to this dir and therefore the original
-- clink.lua is not loaded.
local clink_lua_file = clink.get_env('CMDER_ROOT')..'\\vendor\\clink\\clink.lua'
dofile(clink_lua_file)
@ -26,7 +26,7 @@ function set_prompt_filter()
local old_prompt = clink.prompt.value
local cwd = old_prompt:match('.*(.:[^>]*)>')
if cwd == nil then cwd = clink.get_cwd() end
-- environment systems like pythons virtualenv change the PROMPT and usually
-- set some variable. But the variables are differently named and we would never
-- get them all, so try to parse the env name out of the PROMPT.
@ -34,11 +34,11 @@ function set_prompt_filter()
local env = old_prompt:match('.*%(([^%)]+)%).+:')
-- also check for square brackets
if env == nil then env = old_prompt:match('.*%[([^%]]+)%].+:') end
-- build our own prompt
-- orig: $E[1;32;40m$P$S{git}{hg}$S$_$E[1;30;40m{lamb}$S$E[0m
-- color codes: "\x1b[1;37;40m"
local cmder_prompt = "\x1b[1;32;40m{cwd} {git}{hg}{svn} \n\x1b[1;30;40m{lamb} \x1b[0m"
local cmder_prompt = "\x1b[1;32;40m{cwd} {git}{hg}{svn} \n\x1b[1;39;40m{lamb} \x1b[0m"
cmder_prompt = string.gsub(cmder_prompt, "{cwd}", cwd)
if env == nil then
lambda = "λ"