Skip to content

Instantly share code, notes, and snippets.

@hymkor
Last active March 30, 2022 09:47
Show Gist options
  • Save hymkor/e96fe1ec1e75e14652124095a7c6ea03 to your computer and use it in GitHub Desktop.
Save hymkor/e96fe1ec1e75e14652124095a7c6ea03 to your computer and use it in GitHub Desktop.
nyagos.complete_for["make"] = function(args)
local target = {}
local fd=io.open("Makefile","r")
if fd then
for line in fd:lines() do
local m =string.match(line,'^([^:\t%s]+)%s*:')
if m then
target[1+#target] = m
end
end
fd:close()
end
return target
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment