update current working dir manually after selecting a repo

This commit is contained in:
thefux
2022-03-01 21:37:45 +01:00
parent cd54911788
commit eb880dcd4d

View File

@@ -8,8 +8,10 @@ local lazygit = require("lazygit")
local function open_lazygit(prompt_buf)
local entry = action_state.get_selected_entry()
local cmd = [[lua require"lazygit".lazygit('%s')]]
local cmd = [[lua require"lazygit".lazygit(nil)]]
cmd = cmd:format(entry.value:gsub("%s", ""))
vim.fn.execute('cd ' .. entry.value)
vim.api.nvim_command(cmd)
vim.cmd('stopinsert')
vim.cmd([[execute "normal i"]])