From 7da17d16ef3bf08d1b683f95fcec1c6d48ecdee4 Mon Sep 17 00:00:00 2001 From: ruki Date: Thu, 3 Jan 2019 23:13:50 +0800 Subject: improve plain text in colors --- xmake/modules/lib/detect/check_cxsnippets.lua | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'xmake/modules/lib') diff --git a/xmake/modules/lib/detect/check_cxsnippets.lua b/xmake/modules/lib/detect/check_cxsnippets.lua index 1730a65ed..56e1d9562 100644 --- a/xmake/modules/lib/detect/check_cxsnippets.lua +++ b/xmake/modules/lib/detect/check_cxsnippets.lua @@ -200,23 +200,23 @@ function main(snippets, opt) if opt.verbose or option.get("verbose") or option.get("diagnosis") then local kind = ifelse(sourcekind == "cc", "c", "c++") if #includes > 0 then - cprint("checking for the %s includes %s ... %s", kind, table.concat(includes, ", "), ifelse(ok, "${green}ok", "${red}no")) + cprint("${dim}checking for the %s includes %s ... %s", kind, table.concat(includes, ", "), ok and "${color.success}${text.success}" or "${color.nothing}${text.nothing}") end if #types > 0 then - cprint("checking for the %s types %s ... %s", kind, table.concat(types, ", "), ifelse(ok, "${green}ok", "${red}no")) + cprint("${dim}checking for the %s types %s ... %s", kind, table.concat(types, ", "), ok and "${color.success}${text.success}" or "${color.nothing}${text.nothing}") end if #funcs > 0 then - cprint("checking for the %s funcs %s ... %s", kind, table.concat(funcs, ", "), ifelse(ok, "${green}ok", "${red}no")) + cprint("${dim}checking for the %s funcs %s ... %s", kind, table.concat(funcs, ", "), ok and "${color.success}${text.success}" or "${color.nothing}${text.nothing}") end if #links > 0 then - cprint("checking for the %s links %s ... %s", kind, table.concat(links, ", "), ifelse(ok, "${green}ok", "${red}no")) + cprint("${dim}checking for the %s links %s ... %s", kind, table.concat(links, ", "), ok and "${color.success}${text.success}" or "${color.nothing}${text.nothing}") end for _, snippet in ipairs(snippets) do - cprint("checking for the %s snippet %s ... %s", kind, snippet:sub(1, 16), ifelse(ok, "${green}ok", "${red}no")) + cprint("${dim}checking for the %s snippet %s ... %s", kind, snippet:sub(1, 16), ok and "${color.success}${text.success}" or "${color.nothing}${text.nothing}") end end if errors and #errors > 0 and option.get("diagnosis") then - cprint("${yellow}checkinfo:${clear dim} %s", errors) + cprint("${color.warning}checkinfo:${clear dim} %s", errors) end -- ok? -- cgit v1.3.1