Skip to content

Instantly share code, notes, and snippets.

@rbtnn
Created July 1, 2015 15:07
Show Gist options
  • Save rbtnn/739a2fabf3317a95c965 to your computer and use it in GitHub Desktop.
Save rbtnn/739a2fabf3317a95c965 to your computer and use it in GitHub Desktop.
nyagos gitブランチ補完
nyagos.completion_hook = function (c)
local bs = {
"submodules",
"add",
};
if c.text:match('^git ') then
for b in nyagos.eval('git branch'):gmatch('[^ \n*>-/]+') do
table.insert(bs, b);
end
end
return bs;
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment