From 8cd55b958bc7e65df454cf024dc4300364dfaf01 Mon Sep 17 00:00:00 2001 From: Wu Zhenyu Date: Tue, 5 Dec 2023 01:15:17 +0800 Subject: [PATCH] :bug: Fix wrong string --- prompt-style.lua | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/prompt-style.lua b/prompt-style.lua index 2a98bee..c243510 100644 --- a/prompt-style.lua +++ b/prompt-style.lua @@ -12,8 +12,8 @@ if table.unpack == nil then table.unpack = unpack end ---@param cmd string ---@return string local function wakatime(cmd) - cmd = cmd or "wakatime-cli --write --plugin=repl-lua-wakatime \ ---entity-type=app entity=lua --alternate-language=lua --project=%s" + cmd = cmd or "wakatime-cli --write --plugin=repl-lua-wakatime " .. + "--entity-type=app --entity=lua --alternate-language=lua --project=%s" local s, _ = string.find(cmd, "%s") if s ~= nil then cmd = string.format(cmd, @@ -110,11 +110,11 @@ end local function generate_ps1(char, sections) char = char or "❯ " sections = sections or { - ---@diagnostic disable: missing-parameter - { "", "", wakatime }, - { "black", "yellow", get_icon() }, { "blue", "black", get_version() }, - { "white", "blue", get_cwd }, { "black", "white", get_time } - } + ---@diagnostic disable: missing-parameter + { "", "", wakatime }, + { "black", "yellow", get_icon() }, { "blue", "black", get_version() }, + { "white", "blue", get_cwd }, { "black", "white", get_time } + } local sep = "" local format = " %s " return function()