Skip to content

Commit

Permalink
we don't need a second function for that.
Browse files Browse the repository at this point in the history
  • Loading branch information
Stanzilla committed Jun 30, 2016
1 parent 6a474dd commit 924ab12
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions vendor/clink.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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

---
Expand Down Expand Up @@ -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)

Expand Down

0 comments on commit 924ab12

Please sign in to comment.