You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

git-branch.kak 354B

12345678
  1. declare-option -docstring "git branch holding the current buffer" str git_branch
  2. hook global WinCreate .* %{
  3. hook window NormalIdle .* %{ evaluate-commands %sh{
  4. branch=$(cd "$(dirname "${kak_buffile}")" && git rev-parse --abbrev-ref HEAD 2>/dev/null)
  5. [ -n "${branch}" ] && printf 'set window git_branch %%{%s}' "${branch}"
  6. } }
  7. }