Skip to content

Instantly share code, notes, and snippets.

View bhank's full-sized avatar

Adam Coyne bhank

  • Coyne Solutions, Inc.
  • St. Paul, MN
View GitHub Profile
@bhank
bhank / git_checkout.lua
Last active March 16, 2023 23:09 — forked from sweiss3/git_checkout.lua
A clink script for supporting tab-completion of git branches when using "git checkout"
-- Ctrl-Q in conemu to reload Clink Lua scripts
-- Clink match generators: https://github.com/mridgers/clink/blob/master/docs/clink.md#user-content-match-generators
-- Strings: http://lua-users.org/wiki/StringLibraryTutorial
-- Patterns: http://lua-users.org/wiki/PatternsTutorial
-- Escaping: http://www.lua.org/pil/20.2.html
-- local: http://www.lua.org/pil/4.2.html
-- git commands which will autocomplete branch names after them:
local git_commands = {"checkout", "co", "merge", "branch -d", "branch -D"}