Skip to content

Instantly share code, notes, and snippets.

View mattdkerr's full-sized avatar

Matt Kerr mattdkerr

View GitHub Profile
@jonasem
jonasem / git.lua
Last active November 19, 2022 22:14
git status peek in prompt for clink
---
-- Find out current branch
-- @return {false|git branch name}
---
function get_git_branch()
for line in io.popen("git branch 2>nul"):lines() do
local m = line:match("%* (.+)$")
if m then
return m
end