From 0d66e319342f99b6120016e3abe9e1b01a6fb734 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Sat, 21 Dec 2024 19:53:38 +0800 Subject: [PATCH] feat(git): update git-tag completion --- bundle/git.vim/lua/git/command/tag.lua | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/bundle/git.vim/lua/git/command/tag.lua b/bundle/git.vim/lua/git/command/tag.lua index fd217cef8..69385283c 100644 --- a/bundle/git.vim/lua/git/command/tag.lua +++ b/bundle/git.vim/lua/git/command/tag.lua @@ -72,12 +72,16 @@ function M.run(argv) end end +local function get_all_tags() + return vim.fn.systemlist('git tag') +end + function M.complete(ArgLead, CmdLine, CursorPos) local str = string.sub(CmdLine, 1, CursorPos) if vim.regex([[^Git\s\+tag\s\+-\+$]]):match_str(str) then - return table.concat({'--list'}, '\n') + return table.concat({'--list', '-l', '-m', '-a', '-d'}, '\n') else - return '' + return table.concat(get_all_tags(), '\n') end end