diff --git a/vendor/clink.lua b/vendor/clink.lua index 75393f690..e43fbc527 100644 --- a/vendor/clink.lua +++ b/vendor/clink.lua @@ -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 = "λ"