Skip to content

Commit

Permalink
🐛 Fix wrong project name
Browse files Browse the repository at this point in the history
  • Loading branch information
Freed-Wu committed Dec 4, 2023
1 parent 592ad05 commit 1cf2563
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion prompt-style.lua
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,9 @@ local function wakatime(cmd)
if s ~= nil then
local project = io.popen("git rev-parse --show-toplevel 2> /dev/null"):read()
if project == nil then
project = string.match(lfs.currentdir(), "[^/]+$")
project = lfs.currentdir()
end
project = string.match(project, "[^/]+$")
cmd = string.format(cmd, project)
end
io.popen(cmd)
Expand Down

0 comments on commit 1cf2563

Please sign in to comment.