diff options
| author | Robert Günzler <r@gnzler.io> | 2022-11-04 16:40:29 +0100 |
|---|---|---|
| committer | Robert Günzler <r@gnzler.io> | 2022-11-18 18:37:24 +0100 |
| commit | e06d4c6b0065bc92f59bb7f4e09093f51c9659ef (patch) | |
| tree | bcd7c527cba648ca086c2394a644ae537aa8dd00 /.vim/lua/telescope | |
| parent | 2c754ebab57b44021b837da51c5ee43d369e397c (diff) | |
vim/internal/job: improve
Diffstat (limited to '.vim/lua/telescope')
| -rw-r--r-- | .vim/lua/telescope/_extensions/jobs.lua | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/.vim/lua/telescope/_extensions/jobs.lua b/.vim/lua/telescope/_extensions/jobs.lua index 8caea2f..ea97ed0 100644 --- a/.vim/lua/telescope/_extensions/jobs.lua +++ b/.vim/lua/telescope/_extensions/jobs.lua @@ -48,8 +48,21 @@ local function list_jobs(opts) actions.select_default:replace(function() local entry = action_state.get_selected_entry() if not entry then return end - entry.value:shutdown(1, 'SIGKILL') actions.close(prompt_bufnr) + vim.ui.select( + {'Terminate', 'Kill', 'Show', 'Cancel'}, + {prompt = 'Select an action:'}, + function(choice) + if choice == 'Cancel' then + return + elseif choice == 'Show' then + vim.fn.getqflist({ id = entry.value.pid }) + elseif choice == 'Kill' then + entry.value.handle:kill('sigkill') + elseif choice == 'Terminate' then + entry.value.handle:kill('sigterm') + end + end) end) return true end, |