We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 544dd15 commit 04e7826Copy full SHA for 04e7826
lua/lualine/extensions/fugitive.lua
@@ -7,8 +7,16 @@ local function fugitive_branch()
7
return icon .. ' ' .. vim.fn.FugitiveHead()
8
end
9
10
+local function get_git_toplevel_basename()
11
+ local handle = io.popen("basename `git rev-parse --show-toplevel`")
12
+ local result = handle:read("*a")
13
+ handle:close()
14
+ return result:match("^%s*(.-)%s*$") -- trim any whitespace
15
+end
16
+
17
M.sections = {
- lualine_a = { fugitive_branch },
18
+ lualine_a = { get_git_toplevel_basename },
19
+ lualine_b = { fugitive_branch },
20
lualine_z = { 'location' },
21
}
22
0 commit comments