Skip to content

Commit 095fa41

Browse files
authored
Fix zellij layouts completions on MacOS (#1074)
According to the [documentation](https://zellij.dev/documentation/configuration.html#where-does-zellij-look-for-the-config-file) `~/.config/zellij` will take precedence even on MacOS.
1 parent 0bdf55f commit 095fa41

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

custom-completions/zellij/zellij-completions.nu

+7-1
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,13 @@ def "nu-complete zellij layouts" [] {
9494
} else {
9595
match $nu.os-info.name {
9696
"linux" => "~/.config/zellij/layouts/"
97-
"mac" => "~/Library/Application Support/org.Zellij-Contributors.Zellij/layouts"
97+
"macos" => {
98+
if ("~/.config/zellij/layouts/" | path exists) {
99+
"~/.config/zellij/layouts/"
100+
} else {
101+
"~/Library/Application Support/org.Zellij-Contributors.Zellij/layouts"
102+
}
103+
}
98104
_ => (error make { msg: "Unsupported OS for zellij" })
99105
}
100106
}

0 commit comments

Comments
 (0)