move space from "{git}{hg}{svn}" to individual parts

This commit is contained in:
David Refoua 2022-08-30 21:59:09 +04:30 committed by GitHub
parent 4846eff298
commit a617397aea
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

6
vendor/clink.lua vendored
View File

@ -507,7 +507,7 @@ local function git_prompt_filter()
else
color = colors.nostatus
end
clink.prompt.value = string.gsub(clink.prompt.value, "{git}", color.."("..verbatim(branch)..")")
clink.prompt.value = string.gsub(clink.prompt.value, "{git}", " "..color.."("..verbatim(branch)..")")
return false
end
end
@ -555,7 +555,7 @@ local function hg_prompt_filter()
end
end
clink.prompt.value = string.gsub(clink.prompt.value, "{hg}", verbatim(result))
clink.prompt.value = string.gsub(clink.prompt.value, "{hg}", " "..verbatim(result))
return false
end
@ -609,7 +609,7 @@ local function svn_prompt_filter()
color = colors.dirty
end
clink.prompt.value = string.gsub(clink.prompt.value, "{svn}", color.."("..verbatim(branch)..")")
clink.prompt.value = string.gsub(clink.prompt.value, "{svn}", " "..color.."("..verbatim(branch)..")")
return false
end
end