Skip to content

Commit 05db365

Browse files
authored
Merge pull request #2738 from DRSDavidSoft/patch-3
Related to #2654: Move space from "{git}{hg}{svn}" to individual parts
2 parents ef0de62 + a617397 commit 05db365

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

Diff for: vendor/clink.lua

+4-4
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ local function set_prompt_filter()
166166
if uah ~= '' then uah = get_uah_color() .. uah end
167167
if cwd ~= '' then cwd = get_cwd_color() .. cwd end
168168

169-
local version_control = prompt_includeVersionControl and " {git}{hg}{svn}" or ""
169+
local version_control = prompt_includeVersionControl and "{git}{hg}{svn}" or ""
170170

171171
prompt = "{uah}{cwd}" .. version_control .. get_lamb_color() .. cr .. "{env}{lamb} \x1b[0m"
172172
prompt = string.gsub(prompt, "{uah}", uah)
@@ -507,7 +507,7 @@ local function git_prompt_filter()
507507
else
508508
color = colors.nostatus
509509
end
510-
clink.prompt.value = string.gsub(clink.prompt.value, "{git}", color.."("..verbatim(branch)..")")
510+
clink.prompt.value = string.gsub(clink.prompt.value, "{git}", " "..color.."("..verbatim(branch)..")")
511511
return false
512512
end
513513
end
@@ -555,7 +555,7 @@ local function hg_prompt_filter()
555555
end
556556
end
557557

558-
clink.prompt.value = string.gsub(clink.prompt.value, "{hg}", verbatim(result))
558+
clink.prompt.value = string.gsub(clink.prompt.value, "{hg}", " "..verbatim(result))
559559
return false
560560
end
561561

@@ -609,7 +609,7 @@ local function svn_prompt_filter()
609609
color = colors.dirty
610610
end
611611

612-
clink.prompt.value = string.gsub(clink.prompt.value, "{svn}", color.."("..verbatim(branch)..")")
612+
clink.prompt.value = string.gsub(clink.prompt.value, "{svn}", " "..color.."("..verbatim(branch)..")")
613613
return false
614614
end
615615
end

0 commit comments

Comments
 (0)