diff --git a/lua/fzf-lua/actions.lua b/lua/fzf-lua/actions.lua index 53c5c60..33ccd84 100644 --- a/lua/fzf-lua/actions.lua +++ b/lua/fzf-lua/actions.lua @@ -508,6 +508,14 @@ M.git_stash_drop = function(selected, opts) git_exec(selected, opts, cmd) end +M.git_stash_pop = function(selected, opts) + if vim.fn.input("Pop " .. #selected .. " stash(es)? [y/n] ") == "y" then + local cmd = path.git_cwd({"git", "stash", "pop"}, opts) + git_exec(selected, opts, cmd) + vim.cmd("e!") + end +end + M.git_stash_apply = function(selected, opts) if vim.fn.input("Apply " .. #selected .. " stash(es)? [y/n] ") == "y" then local cmd = path.git_cwd({"git", "stash", "apply"}, opts) diff --git a/lua/fzf-lua/config.lua b/lua/fzf-lua/config.lua index 19dd1f3..f070548 100644 --- a/lua/fzf-lua/config.lua +++ b/lua/fzf-lua/config.lua @@ -883,6 +883,7 @@ M._action_to_helpstr = { [actions.git_stage] = "git-stage", [actions.git_unstage] = "git-unstage", [actions.git_reset] = "git-reset", + [actions.git_stash_pop] = "git-stash-pop", [actions.git_stash_drop] = "git-stash-drop", [actions.git_stash_apply] = "git-stash-apply", [actions.git_buf_edit] = "git-buffer-edit",