Skip to content

Commit 0c7174b

Browse files
Fix snacks dashboard git widget showing nushell startup warnings
Pass git status as a jobstart arg list so snacks skips vim.o.shell. Co-authored-by: Cursor <[email protected]>
1 parent a556c50 commit 0c7174b

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

lua/myLuaConf/plugins/snacks.lua

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,11 @@ return {
6464
enabled = function()
6565
return require('snacks').git.get_root() ~= nil
6666
end,
67-
cmd = "git status --short --branch --renames",
67+
-- Pass cmd as a list so snacks runs git directly via jobstart
68+
-- instead of through vim.o.shell. Going through the shell (nushell)
69+
-- prints its "XDG_CONFIG_HOME ... is empty" startup warning into the
70+
-- dashboard when launched from dirs like ~/dotfiles.
71+
cmd = { "git", "status", "--short", "--branch", "--renames" },
6872
height = 5,
6973
padding = 1,
7074
ttl = 5 * 60,

0 commit comments

Comments
 (0)