From 65b693b92df9fa8df4950abd04ace1d953ebb448 Mon Sep 17 00:00:00 2001 From: Brian Ryall Date: Fri, 19 Feb 2021 15:29:05 -0500 Subject: [PATCH] expand ~ for terminal locations --- lua/harpoon/terminal.lua | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/lua/harpoon/terminal.lua b/lua/harpoon/terminal.lua index dddab93..611a64f 100644 --- a/lua/harpoon/terminal.lua +++ b/lua/harpoon/terminal.lua @@ -45,8 +45,15 @@ function getCmd(idx) return commandSet[idx] end -M.setup = function(config) - harpoon_terminal_config = config.terminal or {} +M.setup = function(config) + + local expanded_config = {} + for k in pairs(config.terminal) do + local expanded_path = Path.new(k):expand() + expanded_config[expanded_path] = config.terminal[k] + end + + harpoon_terminal_config = expanded_config or {} end M.gotoTerminal = function(idx)