diff --git a/lua/plugins/toggleterm.lua b/lua/plugins/toggleterm.lua index d1f7ec9..804619e 100644 --- a/lua/plugins/toggleterm.lua +++ b/lua/plugins/toggleterm.lua @@ -5,20 +5,20 @@ return { config = true, keys = { -- horizontal bash - { "th", "lua TermToggleBash('horizontal')", desc = "H-Bash" }, + { "th", "lua TermToggleShell('horizontal')", desc = "H-Shell" }, { "", mode = { "n", "v", "t" }, - " lua TermToggleBash('horizontal')", - desc = "H-Bash", + " lua TermToggleShell('horizontal')", + desc = "H-Shell", }, -- float bash - { "tf", "lua TermToggleBash('float')", desc = "Bash" }, + { "tf", "lua TermToggleShell('float')", desc = "Shell" }, { "", mode = { "n", "v", "t" }, - " lua TermToggleBash('float')", - desc = "Bash", + " lua TermToggleShell('float')", + desc = "Shell", }, -- containers { "tc", "lua TermToggleContainer('float')", desc = "Container" }, diff --git a/lua/user/toggleterm.lua b/lua/user/toggleterm.lua index 4672489..eca3b92 100644 --- a/lua/user/toggleterm.lua +++ b/lua/user/toggleterm.lua @@ -108,7 +108,7 @@ local function get_containers() return hosts end -local bash = { +local shells = { float = { term = nil, size = -1, @@ -123,10 +123,10 @@ local bash = { }, } -function TermToggleBash(direction) +function TermToggleShell(direction) direction = direction or "float" - if bash[direction].term == nil then - bash[direction].term = Terminal:new({ + if shells[direction].term == nil then + shells[direction].term = Terminal:new({ id = next_id(), display_name = vim.o.shell .. ":" .. direction, cmd = vim.o.shell, @@ -134,7 +134,7 @@ function TermToggleBash(direction) hidden = true, }) end - bash[direction].term:toggle(bash[direction].size, direction) + shells[direction].term:toggle(shells[direction].size, direction) end local lazygit = nil @@ -148,7 +148,7 @@ end local lua = nil function TermToggleLua() if lua == nil then - lua = Terminal:new({ id = next_id(), display_name = "Lua", cmd = "lua", hidden = true }) + lua = Terminal:new({ id = next_id(), display_name = "Lua", cmd = "lua54", hidden = true }) end lua:toggle() end