From 1115cf025dae4fd3de82d858cb9eb3d5889e83b2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=B3bert=20Kalm=C3=A1r?= <rfrostkalmar@gmail.com> Date: Wed, 19 Mar 2025 08:29:38 +0100 Subject: [PATCH] Fix zellij layouts completions on MacOS --- custom-completions/zellij/zellij-completions.nu | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/custom-completions/zellij/zellij-completions.nu b/custom-completions/zellij/zellij-completions.nu index a337a4e56..3f64076a6 100644 --- a/custom-completions/zellij/zellij-completions.nu +++ b/custom-completions/zellij/zellij-completions.nu @@ -94,7 +94,13 @@ def "nu-complete zellij layouts" [] { } else { match $nu.os-info.name { "linux" => "~/.config/zellij/layouts/" - "mac" => "~/Library/Application Support/org.Zellij-Contributors.Zellij/layouts" + "macos" => { + if ("~/.config/zellij/layouts/" | path exists) { + "~/.config/zellij/layouts/" + } else { + "~/Library/Application Support/org.Zellij-Contributors.Zellij/layouts" + } + } _ => (error make { msg: "Unsupported OS for zellij" }) } }