mirror of
https://github.com/cmderdev/cmder.git
synced 2024-11-10 09:49:12 +08:00
we don't need a second function for that.
This commit is contained in:
parent
6a474dd624
commit
924ab12aeb
8
vendor/clink.lua
vendored
8
vendor/clink.lua
vendored
@ -23,12 +23,7 @@ function set_prompt_filter()
|
||||
cwd = clink.get_cwd()
|
||||
prompt = "\x1b[1;32;40m{cwd} {git}{hg} \n\x1b[1;30;40m{lamb} \x1b[0m"
|
||||
new_value = string.gsub(prompt, "{cwd}", cwd)
|
||||
clink.prompt.value = new_value
|
||||
end
|
||||
|
||||
|
||||
function lambda_prompt_filter()
|
||||
clink.prompt.value = string.gsub(clink.prompt.value, "{lamb}", "λ")
|
||||
clink.prompt.value = string.gsub(new_value, "{lamb}", "λ")
|
||||
end
|
||||
|
||||
---
|
||||
@ -246,7 +241,6 @@ end
|
||||
|
||||
-- insert the set_prompt at the very beginning so that it runs first
|
||||
clink.prompt.register_filter(set_prompt_filter, 1)
|
||||
clink.prompt.register_filter(lambda_prompt_filter, 40)
|
||||
clink.prompt.register_filter(hg_prompt_filter, 50)
|
||||
clink.prompt.register_filter(git_prompt_filter, 50)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user