From 106b39ecbcb473d165d951c27b305f333ad2bb5a Mon Sep 17 00:00:00 2001 From: Cian Hughes Date: Sun, 21 Dec 2025 23:29:43 +0000 Subject: [PATCH] Fixed shell config issues --- lua/config/init.lua | 14 ++++++++++++++ lua/config/shell.lua | 13 ------------- 2 files changed, 14 insertions(+), 13 deletions(-) delete mode 100644 lua/config/shell.lua diff --git a/lua/config/init.lua b/lua/config/init.lua index ff2da36..e36d339 100644 --- a/lua/config/init.lua +++ b/lua/config/init.lua @@ -6,6 +6,20 @@ vim.opt.mouse = "a" -- enable mouse mode for window resizing vim.opt.clipboard = "unnamedplus" -- share system and nvim clipboard vim.g.have_nerd_font = true vim.opt.undofile = true -- Save undo history +-- Add shell-specific settings +local shell_path = os.getenv("SHELL") or "" + +if (vim.fn.executable("nu") == 1) and shell_path:find("nu") then + vim.opt.sh = "nu" + vim.opt.shelltemp = false + vim.opt.shellredir = "out+err> %s" + vim.opt.shellcmdflag = "--stdin --no-newline -c" + vim.opt.shellxescape = "" + vim.opt.shellxquote = "" + vim.opt.shellquote = "" + vim.opt.shellpipe = + "| complete | update stderr { ansi strip } | tee { get stderr | save --force --raw %s } | into record" +end -- Add custom commentstring definitions vim.api.nvim_create_autocmd("FileType", { pattern = "nix,flake", diff --git a/lua/config/shell.lua b/lua/config/shell.lua deleted file mode 100644 index 7d6b4d7..0000000 --- a/lua/config/shell.lua +++ /dev/null @@ -1,13 +0,0 @@ -local shell_path = os.getenv("SHELL") or "" - -if (vim.fn.executable("nu") == 1) and shell_path:find("nu") then - vim.opt.sh = "nu" - vim.opt.shelltemp = false - vim.opt.shellredir = "out+err> %s" - vim.opt.shellcmdflag = "--stdin --no-newline -c" - vim.opt.shellxescape = "" - vim.opt.shellxquote = "" - vim.opt.shellquote = "" - vim.opt.shellpipe = - "| complete | update stderr { ansi strip } | tee { get stderr | save --force --raw %s } | into record" -end