fix(lualine): use better command for parsing branch name

This commit is contained in:
Simon Lasbrugnas 2024-11-11 02:51:19 +01:00
parent 4cb2047971
commit 85a92af060
Signed by untrusted user who does not match committer: simon
GPG key ID: 86039876BA6ED8DE

View file

@ -1,4 +1,4 @@
local branch_name = vim.fn.system("cat .git/HEAD | sed 's/.*\\///' | tr -d '\n'") local branch_name = vim.fn.system("git branch --show-current | tr -d '\n'")
local function branch() local function branch()
if branch_name ~= "" then if branch_name ~= "" then